Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9f2f8ba1 authored by Samuel Ortiz's avatar Samuel Ortiz
Browse files

NFC: Unregister device if pn533 initial configuration fails

parent 7c2a04a9
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -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: