linux-stable/drivers/staging
Connor Kuehl dfc1daba84 staging: rtl8188eu: fix null dereference when kzalloc fails
[ Upstream commit 955c1532a3 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-11-06 13:05:45 +01:00
..
android staging: android: ion: Bail out upon SIGKILL when allocating memory. 2019-08-16 10:12:38 +02:00
axis-fifo staging: axis-fifo: add CONFIG_OF dependency 2019-05-04 09:20:12 +02:00
board
clocking-wizard
comedi staging: comedi: dt3000: Fix rounding up of timer divisor 2019-08-25 10:47:59 +02:00
dgnc
emxx_udc
erofs staging: erofs: detect potential multiref due to corrupted images 2019-10-11 18:21:41 +02:00
fbtft Staging: fbtft: fix memory leak in fbtft_framebuffer_alloc 2019-10-17 13:45:10 -07:00
fsl-dpaa2 staging: fsl-dpaa2/ethsw: fix memory leak of switchdev_work 2019-07-14 08:11:22 +02:00
fwserial
gasket staging: gasket: apex: fix copy-paste typo 2019-08-16 10:12:37 +02:00
gdm724x
goldfish
greybus staging: greybus: power_supply: fix prop-descriptor request size 2019-05-10 17:54:04 +02:00
gs_fpgaboot
iio staging:iio:ad7150: fix threshold mode config bit 2019-07-14 08:11:05 +02:00
ks7010
media media: imx: mipi csi-2: Don't fail if initial state times-out 2019-10-05 13:09:43 +02:00
most staging: most: cdev: fix chrdev_region leak in mod_exit 2019-05-10 17:54:05 +02:00
mt29f_spinand
mt7621-dma
mt7621-dts
mt7621-eth
mt7621-mmc
mt7621-pci staging, mt7621-pci: fix build without pci support 2019-05-04 09:20:12 +02:00
mt7621-pinctrl staging: mt7621-pinctrl: use pinconf-generic for 'dt_node_to_map' and 'dt_free_map' 2019-11-06 13:05:27 +01:00
mt7621-spi staging: spi: mt7621: Add return code check on device_reset() 2019-04-05 22:33:11 +02:00
netlogic
nvec
octeon
octeon-usb
olpc_dcon
pi433 staging: pi433: fix potential null dereference 2019-02-12 19:47:02 +01:00
rtl8188eu staging: rtl8188eu: fix null dereference when kzalloc fails 2019-11-06 13:05:45 +01:00
rtl8192e
rtl8192u
rtl8712 staging: rtl8712: reduce stack usage, again 2019-07-14 08:11:22 +02:00
rtl8723bs staging: rtl8188eu: Fix potential NULL pointer dereference of kcalloc 2019-05-04 09:20:16 +02:00
rtlwifi staging: rtlwifi: Fix potential NULL pointer dereference of kzalloc 2019-05-04 09:20:17 +02:00
rts5208
sm750fb
speakup staging: speakup_soft: Fix alternate speech with other synths 2019-04-03 06:26:25 +02:00
unisys
vboxvideo
vc04_services staging: bcm2835-camera: Handle empty EOS buffers whilst streaming 2019-07-14 08:11:22 +02:00
vme
vt6655 staging: vt6655: Fix memory leak in vt6655_probe 2019-10-17 13:45:11 -07:00
vt6656 staging: vt6656: use meaningful error code during buffer allocation 2019-07-31 07:26:57 +02:00
wilc1000 staging: wilc1000: fix error path cleanup in wilc_wlan_initialize() 2019-09-16 08:22:17 +02:00
wlan-ng staging: wlan-ng: fix exit return when sme->key_idx >= NUM_WEPKEYS 2019-10-29 09:19:48 +01:00
xgifb
Kconfig
Makefile