thermal: Fix binding problem when there is thermal zone params
[firefly-linux-kernel-4.4.55.git] / drivers / nfc / mei_phy.c
index b8f8abc422f0f929d1b93e1500c5a595e2deea46..1201bdbfb7918175bc22ae2b1741174b7fbe977c 100644 (file)
@@ -64,6 +64,15 @@ int nfc_mei_phy_enable(void *phy_id)
                 return r;
        }
 
+       r = mei_cl_register_event_cb(phy->device, nfc_mei_event_cb, phy);
+       if (r) {
+               pr_err("MEY_PHY: Event cb registration failed\n");
+               mei_cl_disable_device(phy->device);
+               phy->powered = 0;
+
+               return r;
+       }
+
        phy->powered = 1;
 
        return 0;