diff options
author | Li Hua <[email protected]> | 2022-11-16 10:07:06 +0800 |
---|---|---|
committer | Wim Van Sebroeck <[email protected]> | 2023-02-18 15:11:39 +0100 |
commit | 7d06c07c67100fd0f8e6b3ab7145ce789f788117 (patch) | |
tree | f7dd0fcee9b6c6b54d36d1627ba2ddb6029fa28c /tools/perf/util/scripting-engines/trace-event-python.c | |
parent | 733318534849044089de8c818a2fb1c67fa39bd1 (diff) |
watchdog: pcwd_usb: Fix attempting to access uninitialized memory
The stack variable msb and lsb may be used uninitialized in function
usb_pcwd_get_temperature and usb_pcwd_get_timeleft when usb card no response.
The build waring is:
drivers/watchdog/pcwd_usb.c:336:22: error: ‘lsb’ is used uninitialized in this function [-Werror=uninitialized]
*temperature = (lsb * 9 / 5) + 32;
~~~~^~~
drivers/watchdog/pcwd_usb.c:328:21: note: ‘lsb’ was declared here
unsigned char msb, lsb;
^~~
cc1: all warnings being treated as errors
scripts/Makefile.build:250: recipe for target 'drivers/watchdog/pcwd_usb.o' failed
make[3]: *** [drivers/watchdog/pcwd_usb.o] Error 1
Fixes: b7e04f8c61a4 ("mv watchdog tree under drivers")
Signed-off-by: Li Hua <[email protected]>
Reviewed-by: Guenter Roeck <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Guenter Roeck <[email protected]>
Signed-off-by: Wim Van Sebroeck <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions