linux/sound/soc/sof/amd
Mario Limonciello 2c7b1227e5
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: f120cf33d2 ("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>
History 2026-05-12 10:14:33 +09:00
..
acp-common.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
acp-dsp-offset.h ASoC: SOF: amd: add soundwire wake irq handling 2025-05-03 08:16:44 +09:00
acp-ipc.c ASoC: SOF: amd: acp-ipc: Use guard() for spinlock_irq() 2026-01-12 11:21:25 +00:00
acp-loader.c ASoC: SOF: amd: acp-loader: Use GFP_KERNEL for DMA allocations in resume context 2025-07-28 18:58:15 +01:00
acp-pcm.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
acp-probes.c ALSA: compress_offload: Add 64-bit safe timestamp infrastructure 2025-09-08 09:33:24 +02:00
acp-stream.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
acp-trace.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
acp.c ASoC: SOF: amd: Fix error code handling in psp_send_cmd() 2026-05-12 10:14:33 +09:00
acp.h ASoC: SOF: amd: Add sof audio support for acp7.2 platform 2025-08-01 14:36:04 +01:00
acp63.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
acp70.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
Kconfig ASoC: SOF: amd: add build support for soundwire 2025-05-03 08:16:45 +09:00
Makefile ASoC: SOF: amd: add support for acp7.0 based platform 2024-08-23 11:03:06 +01:00
pci-acp63.c ASoC: SOF: pci: Convert to EXPORT_NS_DEV_PM_OPS() 2025-03-17 10:14:56 +00:00
pci-acp70.c ASoC: SOF: amd: Add sof audio support for acp7.2 platform 2025-08-01 14:36:04 +01:00
pci-rmb.c ASoC: SOF: amd: Use AMD_NODE 2025-02-18 23:15:17 +00:00
pci-rn.c ASoC: SOF: pci: Convert to EXPORT_NS_DEV_PM_OPS() 2025-03-17 10:14:56 +00:00
pci-vangogh.c ASoC: SOF: pci: Convert to EXPORT_NS_DEV_PM_OPS() 2025-03-17 10:14:56 +00:00
rembrandt.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
renoir.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
vangogh.c ASoC: SOF: amd: Drop unused includes from Vangogh driver 2025-02-10 13:41:49 +00:00