Skip to content

Commit 41ee902

Browse files
committed
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: 7ea0468 ("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
1 parent b9e5e9d commit 41ee902

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/accel/amdxdna/aie2_ctx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -879,7 +879,7 @@ int aie2_hwctx_sync_debug_bo(struct amdxdna_hwctx *hwctx, u32 debug_bo_hdl)
879879
aie2_cmd_wait(hwctx, seq);
880880
if (cmd.result) {
881881
XDNA_ERR(xdna, "Response failure 0x%x", cmd.result);
882-
return ret;
882+
return -EINVAL;
883883
}
884884

885885
return 0;

0 commit comments

Comments
 (0)