diff options
-rw-r--r-- | drivers/video/backlight/adp5520_bl.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/video/backlight/adp5520_bl.c b/drivers/video/backlight/adp5520_bl.c index af3119707dbf..d1aee730d7d8 100644 --- a/drivers/video/backlight/adp5520_bl.c +++ b/drivers/video/backlight/adp5520_bl.c | |||
@@ -211,8 +211,12 @@ static ssize_t adp5520_bl_daylight_max_store(struct device *dev, | |||
211 | const char *buf, size_t count) | 211 | const char *buf, size_t count) |
212 | { | 212 | { |
213 | struct adp5520_bl *data = dev_get_drvdata(dev); | 213 | struct adp5520_bl *data = dev_get_drvdata(dev); |
214 | int ret; | ||
215 | |||
216 | ret = strict_strtoul(buf, 10, &data->cached_daylight_max); | ||
217 | if (ret < 0) | ||
218 | return ret; | ||
214 | 219 | ||
215 | strict_strtoul(buf, 10, &data->cached_daylight_max); | ||
216 | return adp5520_store(dev, buf, count, ADP5520_DAYLIGHT_MAX); | 220 | return adp5520_store(dev, buf, count, ADP5520_DAYLIGHT_MAX); |
217 | } | 221 | } |
218 | static DEVICE_ATTR(daylight_max, 0664, adp5520_bl_daylight_max_show, | 222 | static DEVICE_ATTR(daylight_max, 0664, adp5520_bl_daylight_max_show, |