From 8eb73c6c2675f708283822bd058ad1e416836ba2 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Thu, 9 Jun 2011 10:18:23 +0300 Subject: [PATCH] Staging: mei: fix debug code ! has higher precedence than !=. H_RDY is 8 and since neither 0 nor 1 are equal to 8 the original condition was always true. Signed-off-by: Dan Carpenter Acked-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman --- drivers/staging/mei/init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/mei/init.c b/drivers/staging/mei/init.c index 2818851c0761..d1ffa32cd141 100644 --- a/drivers/staging/mei/init.c +++ b/drivers/staging/mei/init.c @@ -205,10 +205,10 @@ int mei_hw_init(struct mei_device *dev) "host_hw_state = 0x%08x, me_hw_state = 0x%08x.\n", dev->host_hw_state, dev->me_hw_state); - if (!(dev->host_hw_state & H_RDY) != H_RDY) + if (!(dev->host_hw_state & H_RDY)) dev_dbg(&dev->pdev->dev, "host turn off H_RDY.\n"); - if (!(dev->me_hw_state & ME_RDY_HRA) != ME_RDY_HRA) + if (!(dev->me_hw_state & ME_RDY_HRA)) dev_dbg(&dev->pdev->dev, "ME turn off ME_RDY.\n"); printk(KERN_ERR "mei: link layer initialization failed.\n"); -- 2.30.2