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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
9d098192c3
commit
7ca96aa278
@@ -350,7 +350,7 @@ int mei_irq_read_handler(struct mei_device *dev,
|
||||
dev_err(&dev->pdev->dev, "less data available than length=%08x.\n",
|
||||
*slots);
|
||||
/* we can't read the message */
|
||||
ret = -ERANGE;
|
||||
ret = -EBADMSG;
|
||||
goto end;
|
||||
}
|
||||
|
||||
@@ -483,7 +483,7 @@ int mei_irq_write_handler(struct mei_device *dev, struct mei_cl_cb *cmpl_list)
|
||||
if (mei_wd_send(dev))
|
||||
dev_dbg(&dev->pdev->dev, "wd send failed.\n");
|
||||
else if (mei_cl_flow_ctrl_reduce(&dev->wd_cl))
|
||||
return -ENODEV;
|
||||
return -EIO;
|
||||
dev->wd_pending = false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user