summaryrefslogtreecommitdiffstats
path: root/drivers/misc/mei/wd.c
diff options
context:
space:
mode:
authorAlexander Usyskin <alexander.usyskin@intel.com>2014-02-19 17:35:49 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-02-28 15:15:57 -0800
commit7ca96aa278f8b9983184e318b06a0ed9ad0297b8 (patch)
treeb01220d624e9fbf70258a96890be25b56405c11e /drivers/misc/mei/wd.c
parent9d098192c3d45ab6dd90ae87d649950a9ef70ccb (diff)
downloadlinux-7ca96aa278f8b9983184e318b06a0ed9ad0297b8.tar.bz2
mei: make return values consistent across the driver
1. Propagate ENOTTY to user space if the client is not present in the system 2. Use ETIME consistently on timeouts 3. Return EIO on write failures 4. Return ENODEV on recoverable device failures such as resets Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mei/wd.c')
-rw-r--r--drivers/misc/mei/wd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/misc/mei/wd.c b/drivers/misc/mei/wd.c
index afe976a18586..4644b62e9055 100644
--- a/drivers/misc/mei/wd.c
+++ b/drivers/misc/mei/wd.c
@@ -53,7 +53,7 @@ static void mei_wd_set_start_timeout(struct mei_device *dev, u16 timeout)
*
* @dev: the device structure
*
- * returns -ENENT if wd client cannot be found
+ * returns -ENOTTY if wd client cannot be found
* -EIO if write has failed
* 0 on success
*/
@@ -73,7 +73,7 @@ int mei_wd_host_init(struct mei_device *dev)
id = mei_me_cl_by_uuid(dev, &mei_wd_guid);
if (id < 0) {
dev_info(&dev->pdev->dev, "wd: failed to find the client\n");
- return id;
+ return -ENOTTY;
}
cl->me_client_id = dev->me_clients[id].client_id;
@@ -185,7 +185,7 @@ int mei_wd_stop(struct mei_device *dev)
ret = 0;
} else {
if (!ret)
- ret = -ETIMEDOUT;
+ ret = -ETIME;
dev_warn(&dev->pdev->dev,
"wd: stop failed to complete ret=%d.\n", ret);
}