mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
wifi: mt76: fix return value check in mt76x02_mac_process_rx
in mt76x02_mac_process_rx(), return an error code if an unexpected result is returned by pskb_trim. Signed-off-by: Yuanjun Gong <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
c19b62fe6b
commit
4904ab2f87
+2
-1
@@ -853,7 +853,8 @@ int mt76x02_mac_process_rx(struct mt76x02_dev *dev, struct sk_buff *skb,
|
||||
if (WARN_ON_ONCE(len > skb->len))
|
||||
return -EINVAL;
|
||||
|
||||
pskb_trim(skb, len);
|
||||
if (pskb_trim(skb, len))
|
||||
return -EINVAL;
|
||||
|
||||
status->chains = BIT(0);
|
||||
signal = mt76x02_mac_get_rssi(dev, rxwi->rssi[0], 0);
|
||||
|
||||
Reference in New Issue
Block a user