hpsa: logical vs bitwise AND typo
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 12 Nov 2015 09:43:38 +0000 (12:43 +0300)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 13 Nov 2015 21:49:35 +0000 (16:49 -0500)
HPSA_DIAG_OPTS_DISABLE_RLD_CACHING is a mask and bitwise AND was
intended here instead of logical &&.  This bug is essentially harmless,
it means that sometimes we don't print a warning message which we wanted
to print.

Fixes: c2adae44e916 ('hpsa: disable report lun data caching')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Acked-by: Don Brace <don.brace@pmcs.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/hpsa.c

index 6d4412359d2392357602e4a7fd0def79c1e98363..bff95090e52ad5b9a779ea54aa4297a95a07e96a 100644 (file)
@@ -8679,7 +8679,7 @@ static void hpsa_disable_rld_caching(struct ctlr_info *h)
        if ((rc != 0)  || (c->err_info->CommandStatus != 0))
                goto errout;
 
-       if (*options && HPSA_DIAG_OPTS_DISABLE_RLD_CACHING)
+       if (*options & HPSA_DIAG_OPTS_DISABLE_RLD_CACHING)
                goto out;
 
 errout: