]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
[SCSI] esas2r: smatch - Use biwise rather than logical AND for checking if any bit set
authorBradley Grove <bgrove@attotech.com>
Thu, 29 Aug 2013 19:55:39 +0000 (15:55 -0400)
committerJames Bottomley <JBottomley@Parallels.com>
Fri, 6 Sep 2013 17:37:19 +0000 (10:37 -0700)
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Bradley Grove <bgrove@attotech.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/esas2r/esas2r_init.c

index 3a798e7d5c5608c3790975183aea380c9538c8e9..78b18c1eb435abc058208cdae05f50c050cb12e9 100644 (file)
@@ -808,7 +808,7 @@ static void esas2r_init_pci_cfg_space(struct esas2r_adapter *a)
        int pcie_cap_reg;
 
        pcie_cap_reg = pci_find_capability(a->pcid, PCI_CAP_ID_EXP);
-       if (0xffff && pcie_cap_reg) {
+       if (0xffff & pcie_cap_reg) {
                u16 devcontrol;
 
                pci_read_config_word(a->pcid, pcie_cap_reg + PCI_EXP_DEVCTL,