mt76x0: fix memory leak during hw probe
authorLorenzo Bianconi <lorenzo.bianconi@redhat.com>
Thu, 6 Sep 2018 09:18:47 +0000 (11:18 +0200)
committerFelix Fietkau <nbd@nbd.name>
Wed, 19 Sep 2018 10:31:04 +0000 (12:31 +0200)
commitcb722aeddcfdab852a06a0477ac197174ea44051
tree0dbb60e01aaad98a8f111c9761da51cca55a613b
parentd1b6eec235972e11da3564c4b55cb2b2b30d19bb
mt76x0: fix memory leak during hw probe

Fix memory leak during hw probe if mt76x0_register_device fails
since MT76_STATE_INITIALIZED has not set yet and mt76x0_cleanup
does not free tx/rx queues and mcu buffers

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt76x0/init.c