aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2012-06-19 02:13:34 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-06-20 19:41:38 -0400
commitd20411588d2f47ded7b0a02ed1005c7e3ce0df40 (patch)
tree36547c64bc348b3fd47c169d5391a458e8d17818 /drivers/misc
parent002176db8113c92d0bda02a47e3d2a4b8f9f55ea (diff)
mei: check for error codes that mei_flow_ctrl_creds retuns
we cannot use if(!mei_flow_ctrl_creds()) logic as mei_flow_ctrl_creds also negative error codes 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/interrupt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/misc/mei/interrupt.c b/drivers/misc/mei/interrupt.c
index 93936f1b75eb..83e80bc08d77 100644
--- a/drivers/misc/mei/interrupt.c
+++ b/drivers/misc/mei/interrupt.c
@@ -1326,7 +1326,7 @@ static int mei_irq_thread_write_handler(struct mei_io_list *cmpl_list,
1326 continue; 1326 continue;
1327 1327
1328 if (cl != &dev->iamthif_cl) { 1328 if (cl != &dev->iamthif_cl) {
1329 if (!mei_flow_ctrl_creds(dev, cl)) { 1329 if (mei_flow_ctrl_creds(dev, cl) <= 0) {
1330 dev_dbg(&dev->pdev->dev, 1330 dev_dbg(&dev->pdev->dev,
1331 "No flow control" 1331 "No flow control"
1332 " credentials for client" 1332 " credentials for client"
@@ -1343,7 +1343,7 @@ static int mei_irq_thread_write_handler(struct mei_io_list *cmpl_list,
1343 } else if (cl == &dev->iamthif_cl) { 1343 } else if (cl == &dev->iamthif_cl) {
1344 /* IAMTHIF IOCTL */ 1344 /* IAMTHIF IOCTL */
1345 dev_dbg(&dev->pdev->dev, "complete amthi write cb.\n"); 1345 dev_dbg(&dev->pdev->dev, "complete amthi write cb.\n");
1346 if (!mei_flow_ctrl_creds(dev, cl)) { 1346 if (mei_flow_ctrl_creds(dev, cl) <= 0) {
1347 dev_dbg(&dev->pdev->dev, 1347 dev_dbg(&dev->pdev->dev,
1348 "No flow control" 1348 "No flow control"
1349 " credentials for amthi" 1349 " credentials for amthi"