Commit 48168f45 authored by Tomas Winkler's avatar Tomas Winkler Committed by Greg Kroah-Hartman

mei: bus: report if event registration failed

If event registeration has failed, the caller should know
about it.
Signed-off-by: default avatarTomas Winkler <tomas.winkler@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7e280ab6
...@@ -256,6 +256,8 @@ void mei_cl_bus_rx_event(struct mei_cl *cl) ...@@ -256,6 +256,8 @@ void mei_cl_bus_rx_event(struct mei_cl *cl)
int mei_cl_register_event_cb(struct mei_cl_device *cldev, int mei_cl_register_event_cb(struct mei_cl_device *cldev,
mei_cl_event_cb_t event_cb, void *context) mei_cl_event_cb_t event_cb, void *context)
{ {
int ret;
if (cldev->event_cb) if (cldev->event_cb)
return -EALREADY; return -EALREADY;
...@@ -264,7 +266,9 @@ int mei_cl_register_event_cb(struct mei_cl_device *cldev, ...@@ -264,7 +266,9 @@ int mei_cl_register_event_cb(struct mei_cl_device *cldev,
cldev->event_context = context; cldev->event_context = context;
INIT_WORK(&cldev->event_work, mei_bus_event_work); 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; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment