From 4f1aa846316d789ae2df6d22d6bca6e4a373e23d Mon Sep 17 00:00:00 2001 From: Michael Hennerich Date: Thu, 11 Nov 2010 14:05:29 -0800 Subject: drivers/video/backlight/adp8860_bl.c: check strict_strtoul() return value Handle return value, strict_strtoul is declared with attribute warn_unused_result. Signed-off-by: Michael Hennerich Cc: Mike Frysinger Acked-by: Richard Purdie Cc: Stephen Rothwell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/video/backlight/adp8860_bl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/video/backlight/adp8860_bl.c b/drivers/video/backlight/adp8860_bl.c index a447c92acc51..734c650a47c4 100644 --- a/drivers/video/backlight/adp8860_bl.c +++ b/drivers/video/backlight/adp8860_bl.c @@ -502,8 +502,10 @@ static ssize_t adp8860_bl_l1_daylight_max_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct adp8860_bl *data = dev_get_drvdata(dev); + int ret = strict_strtoul(buf, 10, &data->cached_daylight_max); + if (ret) + return ret; - strict_strtoul(buf, 10, &data->cached_daylight_max); return adp8860_store(dev, buf, count, ADP8860_BLMX1); } static DEVICE_ATTR(l1_daylight_max, 0664, adp8860_bl_l1_daylight_max_show, -- cgit v1.2.3