]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
accel/qaic: Fix incorrect error return path
authorAswin Venkatesan <aswivenk@qti.qualcomm.com>
Tue, 7 Oct 2025 17:01:30 +0000 (19:01 +0200)
committerJeff Hugo <jeff.hugo@oss.qualcomm.com>
Tue, 14 Oct 2025 15:17:25 +0000 (09:17 -0600)
commit8134da2c9f9c803ae4027e5612b7226ed257da3c
treeaa7fbc21984f3e052190dfa9b3d477af9a7dea13
parent754fcd22d18026fcf0fec0e07ab095f84cd941fd
accel/qaic: Fix incorrect error return path

Found via code inspection that when encode_message() fails in the middle
of processing, instead of returning the actual error code, it always
returns -EINVAL. This is because the entire message length has not been
processed, and the error code is set to -EINVAL.
Instead, take the 'out' path on failure to return the actual error code.

Signed-off-by: Aswin Venkatesan <aswivenk@qti.qualcomm.com>
Signed-off-by: Youssef Samir <youssef.abdulrahman@oss.qualcomm.com>
Reviewed-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com>
Reviewed-by: Carl Vanderlip <carl.vanderlip@oss.qualcomm.com>
Signed-off-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20251007170130.445878-1-youssef.abdulrahman@oss.qualcomm.com
drivers/accel/qaic/qaic_control.c