提交 d2041158 编写于 作者: T Tomas Winkler 提交者: Greg Kroah-Hartman

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: NTomas Winkler <tomas.winkler@intel.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 002176db
......@@ -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"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册