linux-stable/drivers/staging
Vihas Makwana 1868755c90 staging: r8188eu: proper error handling in rtw_init_drv_sw
The code inside rtw_init_drv_sw() calls various init functions to
populate the padapter structure and checks for their return values
respectively.
But if one of the functions in middle fails then it simply returns
_FAIL instead of proper logging and calling freeing counterparts
of previous init functions.
This leads to various memory leaks and can be found in
/sys/kernel/debug/kmemleak if kernel is compiled with DEBUG_KMEMLEAK=y.

Fix this and keep the success and error separate.

Fixes: 2b42bd58b3 ("staging: r8188eu: introduce new os_dep dir for RTL8188eu driver")
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Pavel Skripkin <paskripkin@gmail.com>
Signed-off-by: Vihas Makwana <makvihas@gmail.com>
Link: https://lore.kernel.org/r/20220309205047.45981-3-makvihas@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-03-15 15:18:32 +01:00
..
axis-fifo staging: axis-fifo: Use platform_get_irq() to get the interrupt 2021-12-30 11:54:56 +01:00
board
clocking-wizard
emxx_udc
fbtft Merge 5.17-rc6 into staging-next 2022-02-28 08:44:22 +01:00
fieldbus
fwserial
gdm724x staging: gdm724x: remove redundant assignment of pointer w 2022-03-14 18:27:14 +01:00
greybus staging: greybus: Remove redundant 'flush_workqueue()' calls 2022-02-15 17:05:56 +01:00
iio
ks7010 staging/ks7010: Remove redundant 'flush_workqueue()' calls 2022-02-15 17:05:43 +01:00
media media updates for v5.17-rc1 2022-01-12 10:43:08 -08:00
most staging: most: net: Make use of the helper macro LIST_HEAD() 2022-02-15 17:05:34 +01:00
mt7621-dts staging: mt7621-dts: fix cpuintc and fixedregulator dtc warnings, fix xhci 2022-03-14 16:01:31 +01:00
nvec Staging: nvec: Fix ending in '(' error 2022-02-08 10:46:01 +01:00
octeon
octeon-usb
olpc_dcon
pi433 staging: pi433: formatting improvement for multi-line bitwise statement 2022-03-14 18:31:37 +01:00
qlge staging: qlge: add unregister_netdev in qlge_probe 2022-02-21 18:07:23 +01:00
r8188eu staging: r8188eu: proper error handling in rtw_init_drv_sw 2022-03-15 15:18:32 +01:00
rtl8192e staging: rtl8192e: use BIT macro instead of left shifting 2022-02-21 18:13:37 +01:00
rtl8192u staging: rtl8192u: rework init and exit function 2022-02-25 10:08:32 +01:00
rtl8712 staging: rtl8712: Drop get_recvframe_data() 2022-01-25 16:21:36 +01:00
rtl8723bs staging: rtl8723bs: Use min() instead of doing it manually 2022-03-14 18:33:08 +01:00
rts5208 staging: rts5208: fix Lines should not end with a '('. 2022-03-02 16:34:24 +01:00
sm750fb
unisys Staging: unisys: visorhba: alignment should match open parenthesis 2022-02-08 10:34:53 +01:00
vc04_services staging: vchiq_arm: make vchiq_platform_get_arm_state() static 2022-03-14 16:05:58 +01:00
vme
vt6655 staging: vt6655: Remove unused byRFType in card.c 2022-03-14 18:32:39 +01:00
vt6656 staging: vt6656: Removed unused variable vt3342_vnt_threshold 2022-03-15 15:17:09 +01:00
wfx staging: wfx: flags for SPI IRQ were ignored 2022-02-25 14:00:29 +01:00
wlan-ng staging: wlan-ng: Removed unused comments 2021-11-15 10:02:05 +01:00
Kconfig staging: remove ashmem 2022-03-15 14:25:19 +01:00
Makefile staging: remove ashmem 2022-03-15 14:25:19 +01:00