]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
staging: rtl8822be: fix missing null check on dev_alloc_skb return
authorColin Ian King <colin.king@canonical.com>
Fri, 17 Nov 2017 14:50:55 +0000 (14:50 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Mar 2018 08:09:50 +0000 (09:09 +0100)
commitc702f9b728203a9e95f79151e47ee027ae7a4ea3
tree43ea8428cef110810a643ceab28755852d50fac8
parent6fe526b2e82b56e0908cc4f8726645e771c0d703
staging: rtl8822be: fix missing null check on dev_alloc_skb return

[ Upstream commit 3eb23426e1749a0483bc4c9b18e51f657569e3ed ]

dev_alloc_skb can potentially return NULL, so add a null check to
avoid a null pointer dereference on skb

Detected by CoverityScan, CID#1454558 ("Dereference on null return")

Fixes: 7e5b796cde7e ("staging: r8822be: Add the driver code")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtlwifi/rtl8822be/fw.c