If event registeration has failed, the caller should know
about it.
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
int mei_cl_register_event_cb(struct mei_cl_device *cldev,
mei_cl_event_cb_t event_cb, void *context)
{
+ int ret;
+
if (cldev->event_cb)
return -EALREADY;
cldev->event_context = context;
INIT_WORK(&cldev->event_work, mei_bus_event_work);
- mei_cl_read_start(cldev->cl, 0, NULL);
+ ret = mei_cl_read_start(cldev->cl, 0, NULL);
+ if (ret && ret != -EBUSY)
+ return ret;
return 0;
}