提交 9f2f8ba1 编写于 作者: S Samuel Ortiz

NFC: Unregister device if pn533 initial configuration fails

Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
上级 7c2a04a9
......@@ -2112,13 +2112,17 @@ static int pn533_probe(struct usb_interface *interface,
if (rc) {
nfc_dev_err(&dev->interface->dev, "Error on setting MAX_RETRIES"
" config");
goto free_nfc_dev;
goto unregister_nfc_dev;
}
return 0;
unregister_nfc_dev:
nfc_unregister_device(dev->nfc_dev);
free_nfc_dev:
nfc_free_device(dev->nfc_dev);
destroy_wq:
destroy_workqueue(dev->wq);
error:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册