Commit 16bab114 authored by Ben Greear's avatar Ben Greear Committed by Felix Fietkau

mt76: mt7915: fix potential NPE in TXS processing

If skb is null, then don't try to dereference it.
Signed-off-by: default avatarBen Greear <greearb@candelatech.com>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent e63db6d3
......@@ -1328,7 +1328,7 @@ mt7915_mac_add_txs_skb(struct mt7915_dev *dev, struct mt76_wcid *wcid, int pid,
mt76_tx_status_lock(mdev, &list);
skb = mt76_tx_status_skb_get(mdev, wcid, pid, &list);
if (!skb)
goto out;
goto out_no_skb;
txs = le32_to_cpu(txs_data[0]);
......@@ -1416,6 +1416,8 @@ mt7915_mac_add_txs_skb(struct mt7915_dev *dev, struct mt76_wcid *wcid, int pid,
out:
mt76_tx_status_skb_done(mdev, skb, &list);
out_no_skb:
mt76_tx_status_unlock(mdev, &list);
return !!skb;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment