summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorAlexey Kodanev <aleksei.kodanev@bell-sw.com>2022-12-27 16:33:06 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-03-11 16:26:36 +0100
commit274f52d3afe7a6611139173632fea42f900ba96d (patch)
treee709734e0bb5f6a85f376d33fc6ce6cbaf1f8ac5 /drivers/net/wireless
parente49209db6adff5cc74e887dd1dcf6356f5839cef (diff)
downloadlinux-stable-274f52d3afe7a6611139173632fea42f900ba96d.tar.gz
linux-stable-274f52d3afe7a6611139173632fea42f900ba96d.tar.bz2
linux-stable-274f52d3afe7a6611139173632fea42f900ba96d.zip
wifi: orinoco: check return value of hermes_write_wordrec()
[ Upstream commit 1e346cbb096a5351a637ec1992beffbf330547f0 ] There is currently no return check for writing an authentication type (HERMES_AUTH_SHARED_KEY or HERMES_AUTH_OPEN). It looks like it was accidentally skipped. This patch adds a return check similar to the other checks in __orinoco_hw_setup_enc() for hermes_write_wordrec(). Detected using the static analysis tool - Svace. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Alexey Kodanev <aleksei.kodanev@bell-sw.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20221227133306.201356-1-aleksei.kodanev@bell-sw.com Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/intersil/orinoco/hw.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/intersil/orinoco/hw.c b/drivers/net/wireless/intersil/orinoco/hw.c
index 61af5a28f269..af49aa421e47 100644
--- a/drivers/net/wireless/intersil/orinoco/hw.c
+++ b/drivers/net/wireless/intersil/orinoco/hw.c
@@ -931,6 +931,8 @@ int __orinoco_hw_setup_enc(struct orinoco_private *priv)
err = hermes_write_wordrec(hw, USER_BAP,
HERMES_RID_CNFAUTHENTICATION_AGERE,
auth_flag);
+ if (err)
+ return err;
}
err = hermes_write_wordrec(hw, USER_BAP,
HERMES_RID_CNFWEPENABLED_AGERE,