Commit 3041b096 authored by Lorenzo Bianconi's avatar Lorenzo Bianconi Committed by Greg Kroah-Hartman

mt76x2u: run device cleanup routine if resume fails

[ Upstream commit 9b2fd48d ]

Cleanup {tx,rx} and mcu queues if resume operation fails

Fixes: ee676cd5 ("mt76: add driver code for MT76x2u based devices")
Signed-off-by: default avatarLorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6436e790
......@@ -107,16 +107,24 @@ static int __maybe_unused mt76x2u_resume(struct usb_interface *intf)
mt76u_mcu_complete_urb,
&usb->mcu.cmpl);
if (err < 0)
return err;
goto err;
err = mt76u_submit_rx_buffers(&dev->mt76);
if (err < 0)
return err;
goto err;
tasklet_enable(&usb->rx_tasklet);
tasklet_enable(&usb->tx_tasklet);
return mt76x2u_init_hardware(dev);
err = mt76x2u_init_hardware(dev);
if (err < 0)
goto err;
return 0;
err:
mt76x2u_cleanup(dev);
return err;
}
MODULE_DEVICE_TABLE(usb, mt76x2u_device_table);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment