From: <michael.hennerich@analog.com>
To: akpm@linux-foundation.org
Cc: linux-kernel@vger.kernel.org,
device-drivers-devel@blackfin.uclinux.org, drivers@analog.com,
rpurdie@linux.intel.com, linux-next@vger.kernel.org,
sfr@canb.auug.org.au,
Michael Hennerich <michael.hennerich@analog.com>
Subject: [PATCH] video: backlight: adp8870: Fix warn_unused_result warning reported by Stephen Rothwell
Date: Fri, 29 Oct 2010 16:54:26 +0200 [thread overview]
Message-ID: <1288364066-18709-1-git-send-email-michael.hennerich@analog.com> (raw)
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
next reply other threads:[~2010-10-29 15:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-29 14:54 michael.hennerich [this message]
2010-10-29 19:25 ` [PATCH] video: backlight: adp8870: Fix warn_unused_result warning reported by Stephen Rothwell Andrew Morton
2010-11-02 7:35 ` [Device-drivers-devel] " Mike Frysinger
2010-11-02 8:57 ` Hennerich, Michael
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1288364066-18709-1-git-send-email-michael.hennerich@analog.com \
--to=michael.hennerich@analog.com \
--cc=akpm@linux-foundation.org \
--cc=device-drivers-devel@blackfin.uclinux.org \
--cc=drivers@analog.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=rpurdie@linux.intel.com \
--cc=sfr@canb.auug.org.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).