* [patch] misc/apds9802als: signedness bug in
@ 2010-10-28 4:41 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2010-10-28 4:41 UTC (permalink / raw)
To: Hong Liu
Cc: Alan Cox, Anantha Narayanan, Jonathan Cameron, linux-kernel,
kernel-janitors
The error handling breaks if "ret_val" is unsigned here.
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/drivers/misc/apds9802als.c b/drivers/misc/apds9802als.c
index f9b91ba..0ed0935 100644
--- a/drivers/misc/apds9802als.c
+++ b/drivers/misc/apds9802als.c
@@ -123,7 +123,7 @@ static ssize_t als_sensing_range_store(struct device *dev,
{
struct i2c_client *client = to_i2c_client(dev);
struct als_data *data = i2c_get_clientdata(client);
- unsigned int ret_val;
+ int ret_val;
unsigned long val;
if (strict_strtoul(buf, 10, &val))
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-10-28 4:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-28 4:41 [patch] misc/apds9802als: signedness bug in Dan Carpenter
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).