Message ID | 1619794016-27348-1-git-send-email-wangyunjian@huawei.com |
---|---|
State | New |
Headers | show |
Series | [net] rsi: Add a NULL check in rsi_core_xmit | expand |
diff --git a/drivers/net/wireless/rsi/rsi_91x_core.c b/drivers/net/wireless/rsi/rsi_91x_core.c index a48e616e0fb9..436e7b30d159 100644 --- a/drivers/net/wireless/rsi/rsi_91x_core.c +++ b/drivers/net/wireless/rsi/rsi_91x_core.c @@ -492,5 +492,6 @@ void rsi_core_xmit(struct rsi_common *common, struct sk_buff *skb) xmit_fail: rsi_dbg(ERR_ZONE, "%s: Failed to queue packet\n", __func__); /* Dropping pkt here */ - ieee80211_free_txskb(common->priv->hw, skb); + if (skb) + ieee80211_free_txskb(common->priv->hw, skb); }