]> www.infradead.org Git - users/jedix/linux-maple.git/commit
accel/amdxdna: Return error when setting clock failed for npu1
authorLizhi Hou <lizhi.hou@amd.com>
Thu, 9 Jan 2025 19:48:11 +0000 (11:48 -0800)
committerMario Limonciello <mario.limonciello@amd.com>
Thu, 9 Jan 2025 19:53:22 +0000 (13:53 -0600)
commit0c2768bf818904db705ff18674f771c3c4d8bbca
tree5feea7fc7e60525d5ba884c95ae574d91a08e2fc
parent97395ce76edcce4d39419e90a65d84960fd48aee
accel/amdxdna: Return error when setting clock failed for npu1

Due to miss returning error when setting clock, the smatch static
checker reports warning:
  drivers/accel/amdxdna/aie2_smu.c:68 npu1_set_dpm()
  error: uninitialized symbol 'freq'.

Fixes: f4d7b8a6bc8c ("accel/amdxdna: Enhance power management settings")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/dri-devel/202267d0-882e-4593-b58d-be9274592f9b@stanley.mountain/
Signed-off-by: Lizhi Hou <lizhi.hou@amd.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250109194811.499505-1-lizhi.hou@amd.com
drivers/accel/amdxdna/aie2_smu.c