linux-stable/drivers/staging/rtl8188eu/os_dep
Connor Kuehl 955c1532a3 staging: rtl8188eu: fix null dereference when kzalloc fails
If kzalloc() returns NULL, the error path doesn't stop the flow of
control from entering rtw_hal_read_chip_version() which dereferences the
null pointer. Fix this by adding a 'goto' to the error path to more
gracefully handle the issue and avoid proceeding with initialization
steps that we're no longer prepared to handle.

Also update the debug message to be more consistent with the other debug
messages in this function.

Addresses-Coverity: ("Dereference after null check")

Signed-off-by: Connor Kuehl <connor.kuehl@canonical.com>
Link: https://lore.kernel.org/r/20190927214415.899-1-connor.kuehl@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-01 08:22:44 +02:00
..
ioctl_linux.c staging/rtl8188eu/os_dep: Remove unneeded variable ret 2019-07-01 09:07:03 +02:00
mlme_linux.c staging: rtl8188eu: Remove function rtw_os_indicate_scan_done() 2019-07-22 07:34:14 +02:00
mon.c
os_intfs.c staging: rtl8188eu: Add 'rtl8188eufw.bin' to MODULE_FIRMWARE list 2019-07-01 08:58:21 +02:00
osdep_service.c staging: rtl8188eu: Remove function rtw_modular64() 2019-07-22 07:34:14 +02:00
recv_linux.c staging: rtl8188eu: remove unnecessary parentheses in recv_linux.c 2018-11-11 11:38:54 -08:00
rtw_android.c Staging: rtl8188eu: os_dep: Replace comparison with zero to !x 2019-05-22 14:32:40 +02:00
usb_intf.c staging: rtl8188eu: fix null dereference when kzalloc fails 2019-10-01 08:22:44 +02:00
usb_ops_linux.c staging: r8188eu: use skb_put_data instead of skb_put/memcpy pair 2019-09-03 09:39:53 +02:00
xmit_linux.c staging: rtl8188eu: cleanup comparsions to false 2018-10-15 16:30:39 +02:00