Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

wifi: orinoco: check return value of hermes_write_wordrec()

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

authored by

Alexey Kodanev and committed by
Kalle Valo
1e346cbb cb689109

+2
+2
drivers/net/wireless/intersil/orinoco/hw.c
··· 931 931 err = hermes_write_wordrec(hw, USER_BAP, 932 932 HERMES_RID_CNFAUTHENTICATION_AGERE, 933 933 auth_flag); 934 + if (err) 935 + return err; 934 936 } 935 937 err = hermes_write_wordrec(hw, USER_BAP, 936 938 HERMES_RID_CNFWEPENABLED_AGERE,