summaryrefslogtreecommitdiff
path: root/drivers/misc/mei/nfc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/misc/mei/nfc.c')
-rw-r--r--drivers/misc/mei/nfc.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/misc/mei/nfc.c b/drivers/misc/mei/nfc.c
index 994ca4a..d0c6907 100644
--- a/drivers/misc/mei/nfc.c
+++ b/drivers/misc/mei/nfc.c
@@ -485,11 +485,8 @@ int mei_nfc_host_init(struct mei_device *dev)
if (ndev->cl_info)
return 0;
- ndev->cl_info = mei_cl_allocate(dev);
- ndev->cl = mei_cl_allocate(dev);
-
- cl = ndev->cl;
- cl_info = ndev->cl_info;
+ cl_info = mei_cl_allocate(dev);
+ cl = mei_cl_allocate(dev);
if (!cl || !cl_info) {
ret = -ENOMEM;
@@ -530,9 +527,10 @@ int mei_nfc_host_init(struct mei_device *dev)
cl->device_uuid = mei_nfc_guid;
-
list_add_tail(&cl->device_link, &dev->device_list);
+ ndev->cl_info = cl_info;
+ ndev->cl = cl;
ndev->req_id = 1;
INIT_WORK(&ndev->init_work, mei_nfc_init);