This appears to be an ancient issue with the old github.com sources.

If the cache-line-size property is missing, then the driver probe 
should fail as no dev since the kernel and dt may be out of sync. 

The fix is to add a check for the return value of 
of_property_read_u32.

Signed-off-by: Michael Zoran <mzo...@crowfest.net>
---
 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c 
b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c
index e6241fb5cfa6..1f800f833fbe 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c
@@ -121,8 +121,12 @@ int vchiq_platform_init(struct platform_device *pdev, 
VCHIQ_STATE_T *state)
        if (err < 0)
                return err;
 
-       (void)of_property_read_u32(dev->of_node, "cache-line-size",
+       err = of_property_read_u32(dev->of_node, "cache-line-size",
                                   &g_cache_line_size);
+
+       if (err < 0)
+               return -ENODEV;
+
        g_fragments_size = 2 * g_cache_line_size;
 
        /* Allocate space for the channels in coherent memory */
-- 
2.11.0

_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to