hwmon: (f71882fg) Signedness bug in f71882fg_init()
Subsystems (2)
PATCH 1/1 hwmon: (f71882fg) Signedness bug in f71882fg_init()
"address" stores and unsigned short on success but a negative on failure so it needs to be an int.
Signed-off-by Dan Carpenter <[email protected]>
---
Applies to linux-next. This was introduced in 1f7f944 "hwmon:
(f71882fg) Fix build warning".
drivers/hwmon/f71882fg.c +1 -1
@@ -2662,7 +2662,7 @@ exit_device_put:static int __init f71882fg_init (void ) {int err = -ENODEV ; -unsigned short address; +int address;struct f71882fg_sio_data sio_data;memset (&sio_data,0 ,sizeof (sio_data));
Guenter Roeck
maintainerQuoted 4 lines · Dan Carpenter
"address" stores and unsigned short on success but a negative on failure so it needs to be an int.
Signed-off-by Dan Carpenter <[email protected]>
Patch merged into the original patch introducing the problem.
Thanks,
Guenter
Quoted 18 lines
---
Applies to linux-next. This was introduced in 1f7f944 "hwmon:
(f71882fg) Fix build warning".drivers/hwmon/f71882fg.c +1
-1@@ -2662,7 +2662,7 @@ exit_device_put:static int __init f71882fg_init (void ) {int err = -ENODEV ; -unsigned short address; +int address;struct f71882fg_sio_data sio_data;memset (&sio_data,0 ,sizeof (sio_data));