aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
diff options
context:
space:
mode:
authorDan Carpenter <[email protected]>2025-05-08 06:29:23 +0000
committerUlf Hansson <[email protected]>2025-05-08 11:29:30 +0000
commit0f5757667ec0aaf2456c3b76fcf0c6c3ea3591fe (patch)
tree46a867b1acf190ccd7923611fee29997d98d5fed /drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
parentpmdomain: renesas: rcar: Remove obsolete nullify checks (diff)
downloadkernel-0f5757667ec0aaf2456c3b76fcf0c6c3ea3591fe.tar.gz
kernel-0f5757667ec0aaf2456c3b76fcf0c6c3ea3591fe.zip
pmdomain: core: Fix error checking in genpd_dev_pm_attach_by_id()
The error checking for of_count_phandle_with_args() does not handle negative error codes correctly. The problem is that "index" is a u32 so in the condition "if (index >= num_domains)" negative error codes stored in "num_domains" are type promoted to very high positive values and "index" is always going to be valid. Test for negative error codes first and then test if "index" is valid. Fixes: 3ccf3f0cd197 ("PM / Domains: Enable genpd_dev_pm_attach_by_id|name() for single PM domain") Signed-off-by: Dan Carpenter <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c')
0 files changed, 0 insertions, 0 deletions