diff options
author | Lorenzo Bianconi <lorenzo@kernel.org> | 2021-02-12 14:51:05 +0300 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2021-04-11 19:50:38 +0300 |
commit | baa3afb39e94965f4ca5b5d3d274379504b8fa24 (patch) | |
tree | be9ca42d806a26a25af5f599e7cdba8d11a78bf1 /drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | |
parent | 4b36cc6b390f18dbc59a45fb4141f90d7dfe2b23 (diff) | |
download | linux-baa3afb39e94965f4ca5b5d3d274379504b8fa24.tar.xz |
mt76: connac: always check return value from mt76_connac_mcu_alloc_wtbl_req
Even if this is not a real bug since mt76_connac_mcu_alloc_wtbl_req routine
can fails just if nskb is NULL , always check return value from
mt76_connac_mcu_alloc_wtbl_req in order to avoid possible future
mistake.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt7615/mcu.c')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c index 631596fc2f36..4ecbd5406e2a 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c @@ -1040,6 +1040,9 @@ mt7615_mcu_sta_ba(struct mt7615_dev *dev, wtbl_hdr = mt76_connac_mcu_alloc_wtbl_req(&dev->mt76, &msta->wcid, WTBL_SET, sta_wtbl, &skb); + if (IS_ERR(wtbl_hdr)) + return PTR_ERR(wtbl_hdr); + mt76_connac_mcu_wtbl_ba_tlv(&dev->mt76, skb, params, enable, tx, sta_wtbl, wtbl_hdr); |