]> Pileus Git - ~andy/linux/commit
hwmon: (smsc47m1) Fix compiler warning
authorGuenter Roeck <linux@roeck-us.net>
Wed, 28 Mar 2012 15:55:12 +0000 (08:55 -0700)
committerGuenter Roeck <guenter.roeck@ericsson.com>
Mon, 9 Apr 2012 19:17:38 +0000 (12:17 -0700)
commit1d0045ee4a220872b65147b5b290e4a4852386d9
tree8f4a30ff25413a6b6ce885961c99ae1adf50a8ad
parent776cdc11b3b0fc21e34600e22abe1c8209d2f3f0
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: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Robert Coulson <robert.coulson@ericsson.com>
drivers/hwmon/smsc47m1.c