aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/mei/interrupt.c
diff options
context:
space:
mode:
authorAlexander Usyskin <alexander.usyskin@intel.com>2014-02-19 10:35:49 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-02-28 18:15:57 -0500
commit7ca96aa278f8b9983184e318b06a0ed9ad0297b8 (patch)
treeb01220d624e9fbf70258a96890be25b56405c11e /drivers/misc/mei/interrupt.c
parent9d098192c3d45ab6dd90ae87d649950a9ef70ccb (diff)
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/interrupt.c')
-rw-r--r--drivers/misc/mei/interrupt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/misc/mei/interrupt.c b/drivers/misc/mei/interrupt.c
index e6151e2dac48..31cb3452b9d7 100644
--- a/drivers/misc/mei/interrupt.c
+++ b/drivers/misc/mei/interrupt.c
@@ -350,7 +350,7 @@ int mei_irq_read_handler(struct mei_device *dev,
350 dev_err(&dev->pdev->dev, "less data available than length=%08x.\n", 350 dev_err(&dev->pdev->dev, "less data available than length=%08x.\n",
351 *slots); 351 *slots);
352 /* we can't read the message */ 352 /* we can't read the message */
353 ret = -ERANGE; 353 ret = -EBADMSG;
354 goto end; 354 goto end;
355 } 355 }
356 356
@@ -483,7 +483,7 @@ int mei_irq_write_handler(struct mei_device *dev, struct mei_cl_cb *cmpl_list)
483 if (mei_wd_send(dev)) 483 if (mei_wd_send(dev))
484 dev_dbg(&dev->pdev->dev, "wd send failed.\n"); 484 dev_dbg(&dev->pdev->dev, "wd send failed.\n");
485 else if (mei_cl_flow_ctrl_reduce(&dev->wd_cl)) 485 else if (mei_cl_flow_ctrl_reduce(&dev->wd_cl))
486 return -ENODEV; 486 return -EIO;
487 dev->wd_pending = false; 487 dev->wd_pending = false;
488 } 488 }
489 } 489 }