diff options
author | Ping-Ke Shih <pkshih@realtek.com> | 2019-03-12 12:06:48 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2019-04-04 13:25:27 +0300 |
commit | 60209d482b97743915883d293c8b85226d230c19 (patch) | |
tree | 4dfd3f45af50e21049bf6544bd45b578221e06b2 /drivers/net/wireless/realtek/rtlwifi/rtl8188ee/fw.c | |
parent | 765976285a8c8db3f0eb7f033829a899d0c2786e (diff) | |
download | linux-60209d482b97743915883d293c8b85226d230c19.tar.xz |
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/rtl8188ee/fw.c')
-rw-r--r-- | drivers/net/wireless/realtek/rtlwifi/rtl8188ee/fw.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/fw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/fw.c index 203e7b574e84..e2e0bfbc24fe 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/fw.c +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/fw.c @@ -600,6 +600,8 @@ void rtl88e_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); |