Skip to contentSkip to conversation

brcm80211: fix error code in brcmf_pcie_exit_download_state()

PATCH Applied Dan Carpenter 2 participants 2 messages Nov 27, 2015 – Nov 30, 2015

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

PATCH 1/1 brcm80211: fix error code in brcmf_pcie_exit_download_state()

The original code returns 1 on failure and 0 on success but the caller was expecting an error code on failure.

drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +3 -1
index 83d8042..e149541 100644
@@ -622,7 +622,9 @@ static int brcmf_pcie_exit_download_state(struct brcmf_pciedev_info *devinfo,
 		brcmf_chip_resetcore(core, 0, 0, 0);
 	}
 
-	return !brcmf_chip_set_active(devinfo->ci, resetintr);
+	if (!brcmf_chip_set_active(devinfo->ci, resetintr))
+		return -EINVAL;
+	return 0;
 }
 
 
Applied
#1 lore raw
Quoted 5 lines

The original code returns 1 on failure and 0 on success but the caller was expecting an error code on failure.

Thanks, applied to wireless-drivers-next.git.

Kalle Valo