Commit 0cceacc9 authored by Alexey Kodanev's avatar Alexey Kodanev Committed by sanglipeng
Browse files

wifi: orinoco: check return value of hermes_write_wordrec()

stable inclusion
from stable-v5.10.173
commit b44178e71810b9556fb14515fcea527b73b9573c
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8BFR3

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=b44178e71810b9556fb14515fcea527b73b9573c



--------------------------------

[ Upstream commit 1e346cbb ]

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: 1da177e4 ("Linux-2.6.12-rc2")
Signed-off-by: default avatarAlexey Kodanev <aleksei.kodanev@bell-sw.com>
Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20221227133306.201356-1-aleksei.kodanev@bell-sw.com


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent f302f279
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment