summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/realtek/rtlwifi/rtl8192ee
diff options
context:
space:
mode:
authorPing-Ke Shih <pkshih@realtek.com>2019-03-12 17:06:48 +0800
committerKalle Valo <kvalo@codeaurora.org>2019-04-04 13:25:27 +0300
commit60209d482b97743915883d293c8b85226d230c19 (patch)
tree4dfd3f45af50e21049bf6544bd45b578221e06b2 /drivers/net/wireless/realtek/rtlwifi/rtl8192ee
parent765976285a8c8db3f0eb7f033829a899d0c2786e (diff)
rtlwifi: fix potential NULL pointer dereference
In case dev_alloc_skb fails, the fix safely returns to avoid potential NULL pointer dereference. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/realtek/rtlwifi/rtl8192ee')
-rw-r--r--drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c
index 7c5b54b71a92..67305ce915ec 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c
@@ -744,6 +744,8 @@ void rtl92ee_set_fw_rsvdpagepkt(struct ieee80211_hw *hw, bool b_dl_finished)
u1rsvdpageloc, 3);
skb = dev_alloc_skb(totalpacketlen);
+ if (!skb)
+ return;
skb_put_data(skb, &reserved_page_packet, totalpacketlen);
rtstatus = rtl_cmd_send_packet(hw, skb);