Skip to content

Commit

Permalink
mei: check for error codes that mei_flow_ctrl_creds retuns
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tomas Winkler authored and Greg Kroah-Hartman committed Jun 20, 2012
1 parent 002176d commit d204115
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/misc/mei/interrupt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1326,7 +1326,7 @@ static int mei_irq_thread_write_handler(struct mei_io_list *cmpl_list,
continue;

if (cl != &dev->iamthif_cl) {
if (!mei_flow_ctrl_creds(dev, cl)) {
if (mei_flow_ctrl_creds(dev, cl) <= 0) {
dev_dbg(&dev->pdev->dev,
"No flow control"
" credentials for client"
Expand All @@ -1343,7 +1343,7 @@ static int mei_irq_thread_write_handler(struct mei_io_list *cmpl_list,
} else if (cl == &dev->iamthif_cl) {
/* IAMTHIF IOCTL */
dev_dbg(&dev->pdev->dev, "complete amthi write cb.\n");
if (!mei_flow_ctrl_creds(dev, cl)) {
if (mei_flow_ctrl_creds(dev, cl) <= 0) {
dev_dbg(&dev->pdev->dev,
"No flow control"
" credentials for amthi"
Expand Down

0 comments on commit d204115

Please sign in to comment.