Skip to content

Commit

Permalink
drivers/video/backlight/adp8860_bl.c: check strict_strtoul() return v…
Browse files Browse the repository at this point in the history
…alue

Handle return value, strict_strtoul is declared with attribute
warn_unused_result.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Cc: Mike Frysinger <vapier@gentoo.org>
Acked-by: Richard Purdie <rpurdie@linux.intel.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Michael Hennerich authored and Linus Torvalds committed Nov 12, 2010
1 parent c7ce250 commit 4f1aa84
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/video/backlight/adp8860_bl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 4f1aa84

Please sign in to comment.