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

Configure Feed

Select the types of activity you want to include in your feed.

accel/amdxdna: Fix incorrect return value in aie2_hwctx_sync_debug_bo()

When the driver issues the SYNC_DEBUG_BO command, it currently returns 0
even if the firmware fails to execute the command. Update the driver to
return -EINVAL in this case to properly indicate the failure.

Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/dri-devel/aPsadTBXunUSBByV@stanley.mountain/
Fixes: 7ea046838021 ("accel/amdxdna: Support firmware debug buffer")
Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
Signed-off-by: Lizhi Hou <lizhi.hou@amd.com>
Link: https://patch.msgid.link/20251024162608.1544842-1-lizhi.hou@amd.com

Lizhi Hou 41ee9023 b9e5e9d2

+1 -1
+1 -1
drivers/accel/amdxdna/aie2_ctx.c
··· 879 879 aie2_cmd_wait(hwctx, seq); 880 880 if (cmd.result) { 881 881 XDNA_ERR(xdna, "Response failure 0x%x", cmd.result); 882 - return ret; 882 + return -EINVAL; 883 883 } 884 884 885 885 return 0;