mt76: mt7663u: fix memory leaks in mt7663u_probe
authorLorenzo Bianconi <lorenzo@kernel.org>
Sun, 21 Jun 2020 16:03:38 +0000 (18:03 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 23 Jun 2020 08:43:16 +0000 (11:43 +0300)
commitb1e79d105516fb96c39eb8a780936b87bae8e3e1
tree4d30813c8a572decbb1518d243406f387332cb1b
parent4ac668a3b8c9d3477a3fe162c1cfeb867dd65de8
mt76: mt7663u: fix memory leaks in mt7663u_probe

Fix the two following memory leaks in mt7663u_probe:
1- if device power-own times out, remove ieee80211 hw device.
2- if mt76u queues allocation fails, remove pending urbs.

Fixes: eb99cc95c3b65 ("mt76: mt7615: introduce mt7663u support")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/e4098f0c8a9ac51997de07f38c2bcdf7042d6db1.1592755166.git.lorenzo@kernel.org
drivers/net/wireless/mediatek/mt76/mt7615/usb.c
drivers/net/wireless/mediatek/mt76/usb.c