hwmon: (pmbus_core) Fix compiler warning
authorGuenter Roeck <linux@roeck-us.net>
Wed, 28 Mar 2012 16:14:03 +0000 (09:14 -0700)
committerGuenter Roeck <guenter.roeck@ericsson.com>
Mon, 9 Apr 2012 19:17:38 +0000 (12:17 -0700)
Some configurations produce the following compiler warning:

drivers/hwmon/pmbus/pmbus_core.c: In function 'pmbus_show_boolean':
drivers/hwmon/pmbus/pmbus_core.c:752: warning: 'val' may be used uninitialized in this function

While this is a false positive, it can easily be fixed by overloading the return
value from pmbus_get_boolean with both val and error return code (val is a
boolean and thus never negative).

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Robert Coulson <robert.coulson@ericsson.com>

No differences found