Skip to content

Commit

Permalink
Staging: mei: fix debug code
Browse files Browse the repository at this point in the history
! 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 <error27@gmail.com>
Acked-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Dan Carpenter authored and Greg Kroah-Hartman committed Jun 9, 2011
1 parent e2d4dc5 commit 8eb73c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/staging/mei/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 8eb73c6

Please sign in to comment.