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

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: default avatarGuenter Roeck <linux@roeck-us.net>
Reviewed-by: default avatarRobert Coulson <robert.coulson@ericsson.com>
parent 1d0045ee
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment