提交 912ed8af 编写于 作者: C Colin Ian King 提交者: Greg Kroah-Hartman

mei: fix incorrect logical operator in if statement

The current expression using the || operator is always true because
dev->dev_state cannot be equal to two different values at the same time.
Fix this by replacing the || with &&.

Detected by CoverityScan, CID#1463042 ("Constant expression result")

Fixes: 8d52af67 ("mei: speed up the power down flow")
Signed-off-by: NColin Ian King <colin.king@canonical.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 cc365dcf
...@@ -1261,7 +1261,7 @@ irqreturn_t mei_me_irq_thread_handler(int irq, void *dev_id) ...@@ -1261,7 +1261,7 @@ irqreturn_t mei_me_irq_thread_handler(int irq, void *dev_id)
break; break;
if (rets && if (rets &&
(dev->dev_state != MEI_DEV_RESETTING || (dev->dev_state != MEI_DEV_RESETTING &&
dev->dev_state != MEI_DEV_POWER_DOWN)) { dev->dev_state != MEI_DEV_POWER_DOWN)) {
dev_err(dev->dev, "mei_irq_read_handler ret = %d.\n", dev_err(dev->dev, "mei_irq_read_handler ret = %d.\n",
rets); rets);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册