aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/misc/mei/hw-me.c
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2017-12-19 17:35:30 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-01-02 17:09:29 +0100
commit912ed8afd6432f1c7c084ccd752139debc2f7014 (patch)
tree2e464ea111fc50d820e351622bd63363af097c74 /drivers/misc/mei/hw-me.c
parentmei: me: allow runtime pm for platform with D0i3 (diff)
downloadwireguard-linux-912ed8afd6432f1c7c084ccd752139debc2f7014.tar.xz
wireguard-linux-912ed8afd6432f1c7c084ccd752139debc2f7014.zip
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: 8d52af6795c0 ("mei: speed up the power down flow") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mei/hw-me.c')
-rw-r--r--drivers/misc/mei/hw-me.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/misc/mei/hw-me.c b/drivers/misc/mei/hw-me.c
index 0b21f9ec00f5..334ab02e1de2 100644
--- a/drivers/misc/mei/hw-me.c
+++ b/drivers/misc/mei/hw-me.c
@@ -1261,7 +1261,7 @@ irqreturn_t mei_me_irq_thread_handler(int irq, void *dev_id)
break;
if (rets &&
- (dev->dev_state != MEI_DEV_RESETTING ||
+ (dev->dev_state != MEI_DEV_RESETTING &&
dev->dev_state != MEI_DEV_POWER_DOWN)) {
dev_err(dev->dev, "mei_irq_read_handler ret = %d.\n",
rets);