mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-04 20:19:47 +08:00
Set return value in rsp_buf alloc error path before going to
error handling.
drivers/misc/cardreader/rtsx_usb.c:639:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
if (!ucr->rsp_buf)
^~~~~~~~~~~~~
drivers/misc/cardreader/rtsx_usb.c:678:9: note: uninitialized use occurs here
return ret;
^~~
drivers/misc/cardreader/rtsx_usb.c:639:2: note: remove the 'if' if its condition is always false
if (!ucr->rsp_buf)
^~~~~~~~~~~~~~~~~~
drivers/misc/cardreader/rtsx_usb.c:622:9: note: initialize the variable 'ret' to silence this warning
int ret;
^
= 0
Fixes:
|
||
|---|---|---|
| .. | ||
| alcor_pci.c | ||
| Kconfig | ||
| Makefile | ||
| rtl8411.c | ||
| rts5209.c | ||
| rts5227.c | ||
| rts5228.c | ||
| rts5228.h | ||
| rts5229.c | ||
| rts5249.c | ||
| rts5260.c | ||
| rts5260.h | ||
| rts5261.c | ||
| rts5261.h | ||
| rtsx_pcr.c | ||
| rtsx_pcr.h | ||
| rtsx_usb.c | ||