summaryrefslogtreecommitdiffstats
path: root/drivers/misc/mei/interrupt.c
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2014-02-19 17:35:50 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-02-28 15:15:57 -0800
commitb6d81fd66155fb6d0965502e146b136047e428b3 (patch)
tree867b6e6e1429f038a3c0670abb43b43f31493810 /drivers/misc/mei/interrupt.c
parent7ca96aa278f8b9983184e318b06a0ed9ad0297b8 (diff)
downloadlinux-b6d81fd66155fb6d0965502e146b136047e428b3.tar.gz
linux-b6d81fd66155fb6d0965502e146b136047e428b3.tar.bz2
linux-b6d81fd66155fb6d0965502e146b136047e428b3.zip
mei: wd: simplify wd_send command
Add reduce credits to wd_send to remove code repetition and simplify error handling Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Alexander Usyskin <alexander.usyskin@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.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/misc/mei/interrupt.c b/drivers/misc/mei/interrupt.c
index 31cb3452b9d7..834220af814f 100644
--- a/drivers/misc/mei/interrupt.c
+++ b/drivers/misc/mei/interrupt.c
@@ -480,10 +480,9 @@ int mei_irq_write_handler(struct mei_device *dev, struct mei_cl_cb *cmpl_list)
if (mei_cl_is_connected(&dev->wd_cl)) {
if (dev->wd_pending &&
mei_cl_flow_ctrl_creds(&dev->wd_cl) > 0) {
- 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 -EIO;
+ ret = mei_wd_send(dev);
+ if (ret)
+ return ret;
dev->wd_pending = false;
}
}