diff options
Diffstat (limited to 'drivers/nfc/pn544/mei.c')
-rw-r--r-- | drivers/nfc/pn544/mei.c | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/drivers/nfc/pn544/mei.c b/drivers/nfc/pn544/mei.c index 1eb48848a35a..b5d3d18179eb 100644 --- a/drivers/nfc/pn544/mei.c +++ b/drivers/nfc/pn544/mei.c | |||
@@ -43,24 +43,16 @@ static int pn544_mei_probe(struct mei_cl_device *device, | |||
43 | return -ENOMEM; | 43 | return -ENOMEM; |
44 | } | 44 | } |
45 | 45 | ||
46 | r = mei_cl_register_event_cb(device, nfc_mei_event_cb, phy); | ||
47 | if (r) { | ||
48 | pr_err(PN544_DRIVER_NAME ": event cb registration failed\n"); | ||
49 | goto err_out; | ||
50 | } | ||
51 | |||
52 | r = pn544_hci_probe(phy, &mei_phy_ops, LLC_NOP_NAME, | 46 | r = pn544_hci_probe(phy, &mei_phy_ops, LLC_NOP_NAME, |
53 | MEI_NFC_HEADER_SIZE, 0, MEI_NFC_MAX_HCI_PAYLOAD, | 47 | MEI_NFC_HEADER_SIZE, 0, MEI_NFC_MAX_HCI_PAYLOAD, |
54 | &phy->hdev); | 48 | &phy->hdev); |
55 | if (r < 0) | 49 | if (r < 0) { |
56 | goto err_out; | 50 | nfc_mei_phy_free(phy); |
57 | |||
58 | return 0; | ||
59 | 51 | ||
60 | err_out: | 52 | return r; |
61 | nfc_mei_phy_free(phy); | 53 | } |
62 | 54 | ||
63 | return r; | 55 | return 0; |
64 | } | 56 | } |
65 | 57 | ||
66 | static int pn544_mei_remove(struct mei_cl_device *device) | 58 | static int pn544_mei_remove(struct mei_cl_device *device) |
@@ -71,8 +63,6 @@ static int pn544_mei_remove(struct mei_cl_device *device) | |||
71 | 63 | ||
72 | pn544_hci_remove(phy->hdev); | 64 | pn544_hci_remove(phy->hdev); |
73 | 65 | ||
74 | nfc_mei_phy_disable(phy); | ||
75 | |||
76 | nfc_mei_phy_free(phy); | 66 | nfc_mei_phy_free(phy); |
77 | 67 | ||
78 | return 0; | 68 | return 0; |