]> git.karo-electronics.de Git - linux-beck.git/commit
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)
commitd7ee11157f1fce02632e2f3a56b99b2afd9e5f93
tree1dda4145ec73bd54659bf3ba7ff250d4833bc66a
parent1d0045ee4a220872b65147b5b290e4a4852386d9
hwmon: (pmbus_core) Fix compiler warning

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>
drivers/hwmon/pmbus/pmbus_core.c