mt76: mt7615: check sta_rates pointer in mt7615_sta_rate_tbl_update
authorLorenzo Bianconi <lorenzo@kernel.org>
Sat, 22 Jan 2022 14:58:58 +0000 (15:58 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Apr 2022 12:23:28 +0000 (14:23 +0200)
commita53c147ac4964ea3a8e5837dcebe4c39ecc4b091
tree2f01b72bd6c9fd282e2388a679e8b6740ef7d52f
parentfd1fcad5c053c0d63b194339be550d577c3748b5
mt76: mt7615: check sta_rates pointer in mt7615_sta_rate_tbl_update

[ Upstream commit 6a6f457ed5fdf6777536c20644a9e42128a50ec2 ]

Check sta_rates pointer value in mt7615_sta_rate_tbl_update routine
since minstrel_ht_update_rates can fail allocating rates array.

Fixes: 04b8e65922f63 ("mt76: add mac80211 driver for MT7615 PCIe-based chipsets")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/mediatek/mt76/mt7615/main.c