aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/hsi/ssh:/git@git.zx2c4.com/git:
diff options
context:
space:
mode:
authorMario Limonciello <mario.limonciello@amd.com>2026-05-11 10:36:36 -0500
committerMark Brown <broonie@kernel.org>2026-05-12 10:14:33 +0900
commit2c7b1227e582e88db7917412dca4e752c1aff691 (patch)
tree58eed90ed61d2c3955e73add6a0a3c4723115ea2 /include/linux/hsi/ssh:/git@git.zx2c4.com/git:
parentASoC: sdw_utils: make RT712/RT721 CODEC_MIC be optional (diff)
ASoC: SOF: amd: Fix error code handling in psp_send_cmd()
The smn_read_register() helper returns negative error codes on failure or the register value on success. When used with read_poll_timeout(), the return value is stored in the 'data' variable. Currently 'data' is declared as u32, which causes negative error codes to be cast to large positive values. This makes the condition 'data > 0' incorrectly treat errors as success. Fix by changing 'data' from u32 to int, matching the pattern used in psp_mbox_ready() which correctly handles the same helper function. Reported-by: Dan Carpenter <error27@gmail.com> Closes: https://lore.kernel.org/linux-sound/agGES8vWrLOrBu28@stanley.mountain/ Fixes: f120cf33d232 ("ASoC: SOF: amd: Use AMD_NODE") Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://patch.msgid.link/20260511153638.724810-1-mario.limonciello@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux/hsi/ssh:/git@git.zx2c4.com/git:')
0 files changed, 0 insertions, 0 deletions