From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Anirudh Rayabharam <mail@anirudhrb.com>,
Kalle Valo <kvalo@codeaurora.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Sasha Levin <sashal@kernel.org>,
linux-wireless@vger.kernel.org, netdev@vger.kernel.org
Subject: [PATCH AUTOSEL 5.10 22/62] ath6kl: return error code in ath6kl_wmi_set_roam_lrssi_cmd()
Date: Mon, 24 May 2021 10:47:03 -0400 [thread overview]
Message-ID: <20210524144744.2497894-22-sashal@kernel.org> (raw)
In-Reply-To: <20210524144744.2497894-1-sashal@kernel.org>
From: Anirudh Rayabharam <mail@anirudhrb.com>
[ Upstream commit 54433367840b46a1555c8ed36c4c0cfc5dbf1358 ]
Propagate error code from failure of ath6kl_wmi_cmd_send() to the
caller.
Signed-off-by: Anirudh Rayabharam <mail@anirudhrb.com>
Cc: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20210503115736.2104747-44-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/wireless/ath/ath6kl/debug.c | 5 ++++-
drivers/net/wireless/ath/ath6kl/wmi.c | 4 +---
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/ath/ath6kl/debug.c b/drivers/net/wireless/ath/ath6kl/debug.c
index 7506cea46f58..433a047f3747 100644
--- a/drivers/net/wireless/ath/ath6kl/debug.c
+++ b/drivers/net/wireless/ath/ath6kl/debug.c
@@ -1027,14 +1027,17 @@ static ssize_t ath6kl_lrssi_roam_write(struct file *file,
{
struct ath6kl *ar = file->private_data;
unsigned long lrssi_roam_threshold;
+ int ret;
if (kstrtoul_from_user(user_buf, count, 0, &lrssi_roam_threshold))
return -EINVAL;
ar->lrssi_roam_threshold = lrssi_roam_threshold;
- ath6kl_wmi_set_roam_lrssi_cmd(ar->wmi, ar->lrssi_roam_threshold);
+ ret = ath6kl_wmi_set_roam_lrssi_cmd(ar->wmi, ar->lrssi_roam_threshold);
+ if (ret)
+ return ret;
return count;
}
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c
index 99be0d20f9a5..dbc47702a268 100644
--- a/drivers/net/wireless/ath/ath6kl/wmi.c
+++ b/drivers/net/wireless/ath/ath6kl/wmi.c
@@ -776,10 +776,8 @@ int ath6kl_wmi_set_roam_lrssi_cmd(struct wmi *wmi, u8 lrssi)
cmd->info.params.roam_rssi_floor = DEF_LRSSI_ROAM_FLOOR;
cmd->roam_ctrl = WMI_SET_LRSSI_SCAN_PARAMS;
- ath6kl_wmi_cmd_send(wmi, 0, skb, WMI_SET_ROAM_CTRL_CMDID,
+ return ath6kl_wmi_cmd_send(wmi, 0, skb, WMI_SET_ROAM_CTRL_CMDID,
NO_SYNC_WMIFLAG);
-
- return 0;
}
int ath6kl_wmi_force_roam_cmd(struct wmi *wmi, const u8 *bssid)
--
2.30.2
next prev parent reply other threads:[~2021-05-24 14:53 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20210524144744.2497894-1-sashal@kernel.org>
2021-05-24 14:46 ` [PATCH AUTOSEL 5.10 08/62] Revert "net: fujitsu: fix a potential NULL pointer dereference" Sasha Levin
2021-05-24 14:46 ` [PATCH AUTOSEL 5.10 09/62] net: fujitsu: fix potential null-ptr-deref Sasha Levin
2021-05-24 14:46 ` [PATCH AUTOSEL 5.10 10/62] Revert "net/smc: fix a NULL pointer dereference" Sasha Levin
2021-05-24 14:46 ` [PATCH AUTOSEL 5.10 11/62] net/smc: properly handle workqueue allocation failure Sasha Levin
2021-05-24 14:46 ` [PATCH AUTOSEL 5.10 12/62] Revert "net: caif: replace BUG_ON with recovery code" Sasha Levin
2021-05-24 14:46 ` [PATCH AUTOSEL 5.10 13/62] net: caif: remove BUG_ON(dev == NULL) in caif_xmit Sasha Levin
2021-05-24 14:47 ` [PATCH AUTOSEL 5.10 19/62] Revert "isdn: mISDNinfineon: fix potential NULL pointer dereference" Sasha Levin
2021-05-24 14:47 ` [PATCH AUTOSEL 5.10 20/62] isdn: mISDNinfineon: check/cleanup ioremap failure correctly in setup_io Sasha Levin
2021-05-24 14:47 ` [PATCH AUTOSEL 5.10 21/62] Revert "ath6kl: return error code in ath6kl_wmi_set_roam_lrssi_cmd()" Sasha Levin
2021-05-24 14:47 ` Sasha Levin [this message]
2021-05-24 14:47 ` [PATCH AUTOSEL 5.10 23/62] Revert "isdn: mISDN: Fix potential NULL pointer dereference of kzalloc" Sasha Levin
2021-05-24 14:47 ` [PATCH AUTOSEL 5.10 24/62] isdn: mISDN: correctly handle ph_info allocation failure in hfcsusb_ph_info Sasha Levin
2021-05-24 14:47 ` [PATCH AUTOSEL 5.10 27/62] Revert "libertas: add checks for the return value of sysfs_create_group" Sasha Levin
2021-05-24 14:47 ` [PATCH AUTOSEL 5.10 28/62] libertas: register sysfs groups properly Sasha Levin
2021-05-24 14:47 ` [PATCH AUTOSEL 5.10 39/62] Revert "net: liquidio: fix a NULL pointer dereference" Sasha Levin
2021-05-24 14:47 ` [PATCH AUTOSEL 5.10 40/62] net: liquidio: Add missing null pointer checks Sasha Levin
2021-05-24 14:47 ` [PATCH AUTOSEL 5.10 41/62] Revert "brcmfmac: add a check for the status of usb_register" Sasha Levin
2021-05-24 14:47 ` [PATCH AUTOSEL 5.10 42/62] brcmfmac: properly check for bus register errors Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210524144744.2497894-22-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=kvalo@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=mail@anirudhrb.com \
--cc=netdev@vger.kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).