[PATCH] ti: wlcore: fix error return code of wl1271_suspend()

Subsystems: the rest, ti wilink wireless drivers

STALE1932d

2 messages, 2 authors, 2021-04-18 · open the first message on its own page

[PATCH] ti: wlcore: fix error return code of wl1271_suspend()

From: Jia-Ju Bai <hidden>
Date: 2021-03-06 14:37:07

When wl is NULL, no error return code of wl1271_suspend() is assigned.
To fix this bug, ret is assigned with -EINVAL in this case.

Reported-by: TOTE Robot <redacted>
Signed-off-by: Jia-Ju Bai <redacted>
---
 drivers/net/wireless/ti/wlcore/sdio.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/drivers/net/wireless/ti/wlcore/sdio.c b/drivers/net/wireless/ti/wlcore/sdio.c
index 9fd8cf2d270c..a040d595a43a 100644
--- a/drivers/net/wireless/ti/wlcore/sdio.c
+++ b/drivers/net/wireless/ti/wlcore/sdio.c
@@ -390,6 +390,7 @@ static int wl1271_suspend(struct device *dev)
 
 	if (!wl) {
 		dev_err(dev, "no wilink module was probed\n");
+		ret = -EINVAL;
 		goto out;
 	}
 
-- 
2.17.1

Re: [PATCH] ti: wlcore: fix error return code of wl1271_suspend()

From: Kalle Valo <hidden>
Date: 2021-04-18 05:55:27

Jia-Ju Bai [off-list ref] wrote:
When wl is NULL, no error return code of wl1271_suspend() is assigned.
To fix this bug, ret is assigned with -EINVAL in this case.

Reported-by: TOTE Robot <redacted>
Signed-off-by: Jia-Ju Bai <redacted>
Someone needs to review this.

Patch set to Changes Requested.

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20210306143600.19676-1-baijiaju1990@gmail.com/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help