]> git.baikalelectronics.ru Git - kernel.git/commit
ath11k: add missing null check on allocated skb
authorColin Ian King <colin.king@canonical.com>
Mon, 14 Dec 2020 23:24:17 +0000 (23:24 +0000)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 17 Dec 2020 06:45:20 +0000 (08:45 +0200)
commit87e82b5fa6fa01a11c951b9f4fd69b578ef10b5d
tree6427742c3a54b2c809b622775d5b2c7ae186271b
parent7b58288228b7be2968a81cd762c9a4d89be9d759
ath11k: add missing null check on allocated skb

Currently the null check on a newly allocated skb is missing and
this can lead to a null pointer dereference is the allocation fails.
Fix this by adding a null check and returning -ENOMEM.

Addresses-Coverity: ("Dereference null return")
Fixes: bb84fbf5d9d1 ("ath11k: put hw to DBS using WMI_PDEV_SET_HW_MODE_CMDID")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20201214232417.84556-1-colin.king@canonical.com
drivers/net/wireless/ath/ath11k/wmi.c