2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-19 10:44:14 +08:00

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>
This commit is contained in:
Tomas Winkler 2012-06-19 09:13:34 +03:00 committed by Greg Kroah-Hartman
parent 002176db81
commit d20411588d

View File

@ -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"