public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] hwmon: (sch56xx-common) signedness bug in sch56xx_init()
@ 2012-08-10  9:24 Dan Carpenter
  2012-08-10 18:44 ` Guenter Roeck
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2012-08-10  9:24 UTC (permalink / raw)
  To: kernel-janitors

"address" is used to store an unsigned short on success but a negative
error code on failure.  It needs to be an int for the error handling to
work.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
This is for linux-next.  The bug was introduced in 1645e4fc "hwmon:
(sch56xx-common) Fix build warnings"

diff --git a/drivers/hwmon/sch56xx-common.c b/drivers/hwmon/sch56xx-common.c
index 69abbf7..c93061f5 100644
--- a/drivers/hwmon/sch56xx-common.c
+++ b/drivers/hwmon/sch56xx-common.c
@@ -594,7 +594,7 @@ exit_device_put:
 
 static int __init sch56xx_init(void)
 {
-	unsigned short address;
+	int address;
 	const char *name = NULL;
 
 	address = sch56xx_find(0x4e, &name);

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

end of thread, other threads:[~2012-08-10 18:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-10  9:24 [patch] hwmon: (sch56xx-common) signedness bug in sch56xx_init() Dan Carpenter
2012-08-10 18:44 ` Guenter Roeck

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