Commit 3bb014c7 authored by Yuanjun Gong's avatar Yuanjun Gong Committed by Felix Fietkau

wifi: mt76: mt76x02: 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: default avatarYuanjun Gong <ruc_gongyuanjun@163.com>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent 74f12d51
......@@ -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);
......
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