[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20231113044113.74732-1-suhui@nfschina.com>
Date: Mon, 13 Nov 2023 12:41:14 +0800
From: Su Hui <suhui@...china.com>
To: kvalo@...nel.org
Cc: Su Hui <suhui@...china.com>, linux-wireless@...r.kernel.org,
linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: [PATCH wireless-next] wlcore: debugfs: add an error code check in beacon_filtering_write
wl1271_acx_beacon_filter_opt() return error code if failed, add a check
for this is better and safer.
Signed-off-by: Su Hui <suhui@...china.com>
---
drivers/net/wireless/ti/wlcore/debugfs.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ti/wlcore/debugfs.c b/drivers/net/wireless/ti/wlcore/debugfs.c
index eb3d3f0e0b4d..d4071291a8cd 100644
--- a/drivers/net/wireless/ti/wlcore/debugfs.c
+++ b/drivers/net/wireless/ti/wlcore/debugfs.c
@@ -932,13 +932,15 @@ static ssize_t beacon_filtering_write(struct file *file,
wl12xx_for_each_wlvif(wl, wlvif) {
ret = wl1271_acx_beacon_filter_opt(wl, wlvif, !!value);
+ if (ret < 0)
+ break;
}
pm_runtime_mark_last_busy(wl->dev);
pm_runtime_put_autosuspend(wl->dev);
out:
mutex_unlock(&wl->mutex);
- return count;
+ return ret < 0 ? ret : count;
}
static const struct file_operations beacon_filtering_ops = {
--
2.30.2
Powered by blists - more mailing lists