Skip to content
Commit 1d0045ee authored by Guenter Roeck's avatar Guenter Roeck Committed by Guenter Roeck
Browse files

hwmon: (smsc47m1) Fix compiler warning



Some configurations produce the following compiler warning:

drivers/hwmon/smsc47m1.c: In function 'sm_smsc47m1_init':
drivers/hwmon/smsc47m1.c:938: warning: 'address' may be used uninitialized in this function

While this is a false positive, it can easily be fixed by overloading the return
value from smsc47m1_find with both address and error return code (the address
is an unsigned short and thus never negative). This also reduces module size by
a few bytes (46 bytes for x86_64).

Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
Reviewed-by: default avatarRobert Coulson <robert.coulson@ericsson.com>
parent 776cdc11
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment