qcacld-3.0: Unregister usb if probe fails

Unregister with usb stack if probe fails.
Not doing so was causing a kernel panic the next time
WLAN device was enumerated.

Change-Id: Ieeeca485774b41156f5587feaa4f7482746f6650
CRs-Fixed: 2263482
This commit is contained in:
Ajit Pal Singh
2018-06-19 18:35:36 +05:30
committed by nshrivas
vanhempi 4584365853
commit 8914da4621

Näytä tiedosto

@@ -238,10 +238,12 @@ int pld_usb_register_driver(void)
usb_register(&pld_usb_ops);
if (atomic_read(&pld_usb_reg_done) == true)
if (atomic_read(&pld_usb_reg_done) == true) {
status = 0;
else
} else {
usb_deregister(&pld_usb_ops);
status = -1;
}
pr_info("%s usb_register %s, status %d\n", __func__,
(status == 0) ? "done" : "failed", status);