diff mbox series

[6/6] brcmfmac: use chipname in brcmf_fw_alloc_request() for error path as well

Message ID 1550148232-4309-7-git-send-email-arend.vanspriel@broadcom.com (mailing list archive)
State Accepted
Commit a250c91c1762e85c736e67cb4a9a95ebae72e62d
Delegated to: Kalle Valo
Headers show
Series brcmfmac: smallish series | expand

Commit Message

Arend van Spriel Feb. 14, 2019, 12:43 p.m. UTC
The local variable chipname is string representation of chip id and revision
which is printed in the good flow of brcmf_fw_alloc_request(). Also use it
for the error path, ie. for unknown/unsupported devices.

Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
Reviewed-by: Franky Lin <franky.lin@broadcom.com>
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
---
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
index cf1ddf9..8209a42 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
@@ -719,8 +719,10 @@  struct brcmf_fw_request *
 			break;
 	}
 
+	brcmf_chip_name(chip, chiprev, chipname, sizeof(chipname));
+
 	if (i == table_size) {
-		brcmf_err("Unknown chipid %d [%d]\n", chip, chiprev);
+		brcmf_err("Unknown chip %s\n", chipname);
 		return NULL;
 	}
 
@@ -729,8 +731,6 @@  struct brcmf_fw_request *
 	if (!fwreq)
 		return NULL;
 
-	brcmf_chip_name(chip, chiprev, chipname, sizeof(chipname));
-
 	brcmf_info("using %s for chip %s\n",
 		   mapping_table[i].fw_base, chipname);