Skip to contentSkip to conversation

esas2r: bitwise vs logical AND typo

PATCH New Dan Carpenter 1 participant 1 message Aug 29, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 esas2r: bitwise vs logical AND typo

The intent was to test if any bits were set but it used a logical AND.

drivers/scsi/esas2r/esas2r_init.c +1 -1
index 3a798e7..78b18c1 100644
@@ -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,