[SCSI] hpsa: fix bad comparison
authorDan Carpenter <error27@gmail.com>
Tue, 15 Feb 2011 21:33:13 +0000 (15:33 -0600)
committerJames Bottomley <James.Bottomley@suse.de>
Fri, 18 Feb 2011 18:34:38 +0000 (12:34 -0600)
'!' has higher precedence than '&'.  CFGTBL_ChangeReq is 0x1 so the
original code is equivelent to if (!doorbell_value) {...

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/hpsa.c

index eb6938fe77b008f82b5eca1c06e43e83395c4231..c30591f84a06f1af26a3fe5db97b07c491b1547d 100644 (file)
@@ -3614,7 +3614,7 @@ static void __devinit hpsa_wait_for_mode_change_ack(struct ctlr_info *h)
                spin_lock_irqsave(&h->lock, flags);
                doorbell_value = readl(h->vaddr + SA5_DOORBELL);
                spin_unlock_irqrestore(&h->lock, flags);
-               if (!doorbell_value & CFGTBL_ChangeReq)
+               if (!(doorbell_value & CFGTBL_ChangeReq))
                        break;
                /* delay and try again */
                usleep_range(10000, 20000);