android_kernel_motorola_sm6225/drivers/misc
Shuah Khan e9c3ceabd4 misc: rtsx_usb: set return value in rsp_buf alloc err path
commit 2cd37c2e72449a7add6da1183d20a6247d6db111 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: 3776c7855985 ("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:29:03 +02:00
..
altera-stapl altera-stapl: altera_get_note: prevent write beyond end of 'key' 2020-03-25 08:06:07 +01:00
c2port
cardreader misc: rtsx_usb: set return value in rsp_buf alloc err path 2022-07-12 16:29:03 +02:00
cb710 cb710: avoid NULL pointer subtraction 2021-10-20 11:23:02 +02:00
cxl cxl: Rework error message for incompatible slots 2020-11-05 11:08:34 +01:00
echo misc: echo: Remove unnecessary parentheses and simplify check for zero 2020-04-17 10:48:55 +02:00
eeprom eeprom: idt_89hpesx: Restore printing the unsupported fwnode name 2021-07-20 16:15:56 +02:00
genwqe
ibmasm misc/libmasm/module: Fix two use after free in ibmasm_init_one 2021-07-20 16:16:07 +02:00
lis3lv02d platform/x86: hp_accel: Avoid invoking _INI to speed up resume 2021-06-03 08:38:09 +02:00
lkdtm lkdtm/usercopy: Expand size of "out of frame" object 2022-06-14 16:59:36 +02:00
mei mei: me: add Ice Lake-N device id. 2021-10-20 11:23:01 +02:00
mic misc: vop: add round_up(x,4) for vring_size to avoid kernel panic 2020-10-30 10:38:29 +01:00
ocxl
sgi-gru
sgi-xp
ti-st
vmw_vmci VMCI: fix NULL pointer dereference when unmapping queue pair 2021-09-22 11:48:00 +02:00
ad525x_dpot-i2c.c
ad525x_dpot-spi.c
ad525x_dpot.c
ad525x_dpot.h
apds990x.c
apds9802als.c
aspeed-lpc-ctrl.c soc: aspeed: lpc-ctrl: Fix boundary check for mmap 2021-09-22 11:47:59 +02:00
aspeed-lpc-snoop.c soc: aspeed: fix a ternary sign expansion bug 2021-05-22 10:59:32 +02:00
atmel-ssc.c misc: atmel-ssc: Fix IRQ check in ssc_probe 2022-06-25 11:49:15 +02:00
atmel_tclib.c
bh1770glc.c
cs5535-mfgpt.c
ds1682.c
dummy-irq.c
enclosure.c
fsa9480.c
hmc6352.c
hpilo.c
hpilo.h
ibmvmc.c
ibmvmc.h
ics932s401.c
ioc4.c
isl29003.c
isl29020.c
Kconfig
kgdbts.c kgdbts: fix return value of __setup handler 2022-04-15 14:14:52 +02:00
lattice-ecp3-config.c misc: lattice-ecp3-config: Fix task hung when firmware load failed 2022-01-27 09:04:23 +01:00
Makefile
pch_phub.c PCI: Move Rohm Vendor ID to generic list 2020-06-22 09:05:23 +02:00
pci_endpoint_test.c PCI: Add Synopsys endpoint EDDA Device ID 2020-06-22 09:05:24 +02:00
phantom.c
pti.c
qcom-coincell.c
spear13xx_pcie_gadget.c
sram-exec.c
sram.c
sram.h
tifm_7xx1.c
tifm_core.c
tsl2550.c
vexpress-syscfg.c
vmw_balloon.c