summaryrefslogtreecommitdiff
path: root/drivers/misc
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2015-07-23 15:08:38 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-08-04 03:21:58 +0300
commit48168f4561f479403dbd38379dc8793488a22a6a (patch)
tree45c845a16aecb716b3bfcd3b734adf3c32595f41 /drivers/misc
parent7e280ab694e2885ee300de9cf5e7047c68230148 (diff)
downloadlinux-48168f4561f479403dbd38379dc8793488a22a6a.tar.xz
mei: bus: report if event registration failed
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>
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/mei/bus.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/misc/mei/bus.c b/drivers/misc/mei/bus.c
index 257e200b5343..aba7688d1ddd 100644
--- a/drivers/misc/mei/bus.c
+++ b/drivers/misc/mei/bus.c
@@ -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,
mei_cl_event_cb_t event_cb, void *context)
{
+ int ret;
+
if (cldev->event_cb)
return -EALREADY;
@@ -264,7 +266,9 @@ int mei_cl_register_event_cb(struct mei_cl_device *cldev,
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;
}