From: Tomas Winkler Date: Tue, 19 Jun 2012 06:13:34 +0000 (+0300) Subject: mei: check for error codes that mei_flow_ctrl_creds retuns X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d20411588d2f47ded7b0a02ed1005c7e3ce0df40;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Greg Kroah-Hartman --- 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, 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" @@ -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"