From: Laurent Pinchart Date: Sat, 14 Mar 2015 15:38:39 +0000 (+0200) Subject: video: fbdev: sh_mobile_lcdcfb: Fix ROP3 sysfs attribute parsing X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=14048ffed0145a425a8d3114ce8ff48172460238;p=deliverable%2Flinux.git video: fbdev: sh_mobile_lcdcfb: Fix ROP3 sysfs attribute parsing 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 Signed-off-by: Laurent Pinchart Acked-by: Geert Uytterhoeven Signed-off-by: Tomi Valkeinen --- diff --git a/drivers/video/fbdev/sh_mobile_lcdcfb.c b/drivers/video/fbdev/sh_mobile_lcdcfb.c index d3013cd9f976..23421ec1c4e4 100644 --- a/drivers/video/fbdev/sh_mobile_lcdcfb.c +++ b/drivers/video/fbdev/sh_mobile_lcdcfb.c @@ -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++;