linux-stable/drivers/misc
Shuah Khan c1c98764c3 misc: rtsx_usb: set return value in rsp_buf alloc err path
commit 2cd37c2e72 upstream.

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: 3776c78559 ("misc: rtsx_usb: use separate command and response buffers")
Reported-by: kernel test robot <lkp@intel.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Link: https://lore.kernel.org/r/20220701165352.15687-1-skhan@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-07-12 16:35:17 +02:00
..
altera-stapl
bcm-vk
c2port
cardreader misc: rtsx_usb: set return value in rsp_buf alloc err path 2022-07-12 16:35:17 +02:00
cb710
cxl
echo
eeprom eeprom: at25: Use DMA safe buffers 2022-05-09 09:14:44 +02:00
genwqe
habanalabs habanalabs: fix possible memory leak in MMU DR fini 2022-04-13 20:59:12 +02:00
ibmasm
lis3lv02d
lkdtm lkdtm/usercopy: Expand size of "out of frame" object 2022-06-14 18:36:20 +02:00
mei mei: me: add raptor lake point S DID 2022-06-22 14:22:03 +02:00
ocxl misc: ocxl: fix possible double free in ocxl_file_register_afu 2022-06-09 10:23:06 +02:00
pvpanic misc/pvpanic: Convert regular spinlock into trylock on panic path 2022-06-14 18:36:06 +02:00
sgi-gru
sgi-xp
ti-st
uacce
vmw_vmci
ad525x_dpot-i2c.c
ad525x_dpot-spi.c
ad525x_dpot.c
ad525x_dpot.h
apds990x.c
apds9802als.c
atmel-ssc.c misc: atmel-ssc: Fix IRQ check in ssc_probe 2022-06-22 14:22:00 +02:00
bh1770glc.c
cs5535-mfgpt.c
ds1682.c
dummy-irq.c
dw-xdata-pcie.c
enclosure.c
fastrpc.c misc: fastrpc: fix an incorrect NULL check on list iterator 2022-06-14 18:36:04 +02:00
gehc-achc.c
hi6421v600-irq.c
hisi_hikey_usb.c
hmc6352.c
hpilo.c
hpilo.h
ibmvmc.c
ibmvmc.h
ics932s401.c
isl29003.c
isl29020.c
Kconfig
kgdbts.c kgdbts: fix return value of __setup handler 2022-04-08 14:23:50 +02:00
lattice-ecp3-config.c misc: lattice-ecp3-config: Fix task hung when firmware load failed 2022-01-27 11:04:17 +01:00
Makefile
pch_phub.c
pci_endpoint_test.c
phantom.c
qcom-coincell.c
sram-exec.c
sram.c
sram.h
tifm_7xx1.c
tifm_core.c
tsl2550.c
vmw_balloon.c
xilinx_sdfec.c