video: fbdev: sh_mobile_lcdcfb: Fix ROP3 sysfs attribute parsing
authorLaurent Pinchart <[email protected]>
Sat, 14 Mar 2015 15:38:39 +0000 (17:38 +0200)
committerTomi Valkeinen <[email protected]>
Fri, 20 Mar 2015 11:14:50 +0000 (13:14 +0200)
The ROP3 attribute is expressed as an integer in the 0-255 range. Remove
the wrong conversion to boolean when parsing it.

Reported-by: Dan Carpenter <[email protected]>
Signed-off-by: Laurent Pinchart <[email protected]>
Acked-by: Geert Uytterhoeven <[email protected]>
Signed-off-by: Tomi Valkeinen <[email protected]>
drivers/video/fbdev/sh_mobile_lcdcfb.c

index d3013cd9f976966330cd7b501e86e934f1493794..23421ec1c4e44e06dcffb0fbb6999c04c290dfbf 100644 (file)
@@ -1461,7 +1461,7 @@ overlay_rop3_store(struct device *dev, struct device_attribute *attr,
        unsigned int rop3;
        char *endp;
 
-       rop3 = !!simple_strtoul(buf, &endp, 10);
+       rop3 = simple_strtoul(buf, &endp, 10);
        if (isspace(*endp))
                endp++;