mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 12:42:02 +00:00
04e216d19e
0-day rightfully complains about a sometimes uninitialized variable in pmbus_get_boolean(). drivers/hwmon/pmbus/pmbus_core.c:903:13: warning: variable 'ret' is used uninitialized whenever 'if' condition is true } else if (!s1 || !s2) { While that is technically true, it won't be hit in the field since the condition indicates a programming error. Move the check of that condition into the code generating the attribute entry, and refuse generating the attribute if the condition is true. Swap the condition check in pmbus_get_boolean() to ensure that static analyzers don't get a hiccup (because we check if s1 and s2 are NULL, static analyzers may believe that they can be NULL independently of each other). Reported-by: kernel test robot <lkp@intel.com> Cc: Alex Qiu <xqiu@google.com> Reviewed-by: Alex Qiu <xqiu@google.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> |
||
---|---|---|
.. | ||
adm1266.c | ||
adm1275.c | ||
bel-pfe.c | ||
ibm-cffps.c | ||
inspur-ipsps.c | ||
ir35221.c | ||
ir38064.c | ||
irps5401.c | ||
isl68137.c | ||
Kconfig | ||
lm25066.c | ||
ltc2978.c | ||
ltc3815.c | ||
Makefile | ||
max8688.c | ||
max16064.c | ||
max16601.c | ||
max20730.c | ||
max20751.c | ||
max31785.c | ||
max34440.c | ||
pmbus_core.c | ||
pmbus.c | ||
pmbus.h | ||
pxe1610.c | ||
tps40422.c | ||
tps53679.c | ||
ucd9000.c | ||
ucd9200.c | ||
xdpe12284.c | ||
zl6100.c |