[patch] hwmon: (sch56xx-common) signedness bug in sch56xx_init()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"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@xxxxxxxxxx>
---
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);
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux