diff mbox series

rtw88: Use kfree_skb() instead of kfree()

Message ID 20200129173923.rfufhv5c5pxwodm6@kili.mountain (mailing list archive)
State Accepted
Commit bafbc6f0b51b0bb8566c5d8ec255838c8cfe3545
Delegated to: Kalle Valo
Headers show
Series rtw88: Use kfree_skb() instead of kfree() | expand

Commit Message

Dan Carpenter Jan. 29, 2020, 5:39 p.m. UTC
sk_buff structs need to be freed with kfree_skb(), not kfree().

Fixes: b6c12908a33e ("rtw88: Add wowlan net-detect support")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 drivers/net/wireless/realtek/rtw88/fw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Kalle Valo Feb. 12, 2020, 4:20 p.m. UTC | #1
Dan Carpenter <dan.carpenter@oracle.com> wrote:

> sk_buff structs need to be freed with kfree_skb(), not kfree().
> 
> Fixes: b6c12908a33e ("rtw88: Add wowlan net-detect support")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Patch applied to wireless-drivers-next.git, thanks.

bafbc6f0b51b rtw88: Use kfree_skb() instead of kfree()
diff mbox series

Patch

diff --git a/drivers/net/wireless/realtek/rtw88/fw.c b/drivers/net/wireless/realtek/rtw88/fw.c
index 243441453ead..5bdfc70c4529 100644
--- a/drivers/net/wireless/realtek/rtw88/fw.c
+++ b/drivers/net/wireless/realtek/rtw88/fw.c
@@ -745,7 +745,7 @@  static struct sk_buff *rtw_nlo_info_get(struct ieee80211_hw *hw)
 		loc  = rtw_get_rsvd_page_probe_req_location(rtwdev, ssid);
 		if (!loc) {
 			rtw_err(rtwdev, "failed to get probe req rsvd loc\n");
-			kfree(skb);
+			kfree_skb(skb);
 			return NULL;
 		}
 		nlo_hdr->location[i] = loc;