mt76: fix possible NULL pointer dereferencing in mt76x2_mac_write_txwi()
authorLorenzo Bianconi <lorenzo.bianconi@redhat.com>
Thu, 14 Dec 2017 12:03:17 +0000 (13:03 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 17 Jan 2018 14:49:07 +0000 (16:49 +0200)
commit98051872fd25077d3b106ab3d2b945fa7025c1ef
tree6633125123827551556944a3d804cd22cd8e152f
parent99ac5327e902a56ca21365ed3d6e5249fe296ba6
mt76: fix possible NULL pointer dereferencing in mt76x2_mac_write_txwi()

Verify wcid is not NULL before dereferencing the pointer to initialize
txwi rate/power info

Fixes: 7bc04215a66b ("mt76: add driver code for MT76x2e")
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/mediatek/mt76/mt76x2_mac.c