forked from Minki/linux
NFC: Unregister device if pn533 initial configuration fails
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
parent
7c2a04a933
commit
9f2f8ba172
@ -2112,13 +2112,17 @@ static int pn533_probe(struct usb_interface *interface,
|
|||||||
if (rc) {
|
if (rc) {
|
||||||
nfc_dev_err(&dev->interface->dev, "Error on setting MAX_RETRIES"
|
nfc_dev_err(&dev->interface->dev, "Error on setting MAX_RETRIES"
|
||||||
" config");
|
" config");
|
||||||
goto free_nfc_dev;
|
goto unregister_nfc_dev;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
unregister_nfc_dev:
|
||||||
|
nfc_unregister_device(dev->nfc_dev);
|
||||||
|
|
||||||
free_nfc_dev:
|
free_nfc_dev:
|
||||||
nfc_free_device(dev->nfc_dev);
|
nfc_free_device(dev->nfc_dev);
|
||||||
|
|
||||||
destroy_wq:
|
destroy_wq:
|
||||||
destroy_workqueue(dev->wq);
|
destroy_workqueue(dev->wq);
|
||||||
error:
|
error:
|
||||||
|
Loading…
Reference in New Issue
Block a user