mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
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 <[email protected]> Cc: Mike Frysinger <[email protected]> Acked-by: Richard Purdie <[email protected]> Cc: Stephen Rothwell <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
c7ce2500e3
commit
4f1aa84631
1 changed files with 3 additions and 1 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue