Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 17a0e61c authored by Alexey Kodanev's avatar Alexey Kodanev Committed by Greg Kroah-Hartman
Browse files

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: 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>
parent 573dfeba
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -931,6 +931,8 @@ int __orinoco_hw_setup_enc(struct orinoco_private *priv)
			err = hermes_write_wordrec(hw, USER_BAP,
			err = hermes_write_wordrec(hw, USER_BAP,
					HERMES_RID_CNFAUTHENTICATION_AGERE,
					HERMES_RID_CNFAUTHENTICATION_AGERE,
					auth_flag);
					auth_flag);
			if (err)
				return err;
		}
		}
		err = hermes_write_wordrec(hw, USER_BAP,
		err = hermes_write_wordrec(hw, USER_BAP,
					   HERMES_RID_CNFWEPENABLED_AGERE,
					   HERMES_RID_CNFWEPENABLED_AGERE,