diff mbox series

brcmfmac: Add an error log for brcmf_sdiod_ramrw()

Message ID 20250407042028.1481-1-vulab@iscas.ac.cn (mailing list archive)
State New
Delegated to: Johannes Berg
Headers show
Series brcmfmac: Add an error log for brcmf_sdiod_ramrw() | expand

Checks

Context Check Description
wifibot/fixes_present success Fixes tag not required for -next series
wifibot/series_format warning Single patches do not need cover letters; Target tree name not specified in the subject
wifibot/tree_selection success Guessed tree name to be wireless-next
wifibot/ynl success Generated files up to date; no warnings/errors; no diff in generated;
wifibot/build_clang success Errors and warnings before: 0 this patch: 0
wifibot/build_32bit success Errors and warnings before: 0 this patch: 0
wifibot/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
wifibot/build_clang_rust success No Rust files in patch. Skipping build
wifibot/build_tools success No tools touched, skip
wifibot/check_selftest success No net selftest shell script
wifibot/checkpatch success total: 0 errors, 0 warnings, 0 checks, 11 lines checked
wifibot/deprecated_api success None detected
wifibot/header_inline success No static functions without inline keyword in header files
wifibot/kdoc success Errors and warnings before: 0 this patch: 0
wifibot/source_inline success Was 0 now: 0
wifibot/verify_fixes success No Fixes tag
wifibot/verify_signedoff success Signed-off-by tag matches author and committer

Commit Message

Wentao Liang April 7, 2025, 4:20 a.m. UTC
The function brcmf_sdio_buscore_activate() calls the function
brcmf_sdiod_ramrw(), but does not check its return value. Log
the error message to prevent silent failure if the function fails.

Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
---
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
index b1727f35217b..dd683c2582fb 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
@@ -3898,8 +3898,9 @@  static void brcmf_sdio_buscore_activate(void *ctx, struct brcmf_chip *chip,
 
 	if (rstvec)
 		/* Write reset vector to address 0 */
-		brcmf_sdiod_ramrw(sdiodev, true, 0, (void *)&rstvec,
-				  sizeof(rstvec));
+		if (brcmf_sdiod_ramrw(sdiodev, true, 0, (void *)&rstvec,
+				      sizeof(rstvec)) < 0)
+			brcmf_err("Fail to reset vector\n");
 }
 
 static u32 brcmf_sdio_buscore_read32(void *ctx, u32 addr)