public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
* [PATCH] video: backlight: adp8870: Fix warn_unused_result warning reported by Stephen Rothwell
@ 2010-10-29 14:54 michael.hennerich
  2010-10-29 19:25 ` Andrew Morton
  0 siblings, 1 reply; 4+ messages in thread
From: michael.hennerich @ 2010-10-29 14:54 UTC (permalink / raw)
  To: akpm
  Cc: linux-kernel, device-drivers-devel, drivers, rpurdie, linux-next,
	sfr, Michael Hennerich

From: Michael Hennerich <michael.hennerich@analog•com>

handle return value, strict_strtoul is declared with attribute warn_unused_result

Signed-off-by: Michael Hennerich <michael.hennerich@analog•com>
---
 drivers/video/backlight/adp8860_bl.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/video/backlight/adp8860_bl.c b/drivers/video/backlight/adp8860_bl.c
index 3ec2460..8746303 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,
-- 
1.6.0.2

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-11-02  8:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-29 14:54 [PATCH] video: backlight: adp8870: Fix warn_unused_result warning reported by Stephen Rothwell michael.hennerich
2010-10-29 19:25 ` Andrew Morton
2010-11-02  7:35   ` [Device-drivers-devel] " Mike Frysinger
2010-11-02  8:57   ` Hennerich, Michael

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox