diff options
| author | Candice Li <candice.li@amd.com> | 2026-05-19 12:19:38 +0800 |
|---|---|---|
| committer | Alex Deucher <alexander.deucher@amd.com> | 2026-06-03 13:52:49 -0400 |
| commit | d288e4ba09b25e4602685ac4203185a7bda38b0d (patch) | |
| tree | e16be85c189603498641fd33c4cffaed9b04a11b | |
| parent | f193e71fa9fab2e68ef85201b106e8f580d3a25b (diff) | |
| download | linux-d288e4ba09b25e4602685ac4203185a7bda38b0d.tar.gz linux-d288e4ba09b25e4602685ac4203185a7bda38b0d.zip | |
drm/amd/pm: return -EINVAL on invalid CCLK OD core index
Return -EINVAL after an out-of-range core index for
PP_OD_EDIT_CCLK_VDDC_TABLE.
Signed-off-by: Candice Li <candice.li@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| -rw-r--r-- | drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c index d269b505aefb..016a5c893fee 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c @@ -2046,6 +2046,7 @@ static int vangogh_od_edit_dpm_table(struct smu_context *smu, enum PP_OD_DPM_TAB if (input[0] >= smu->cpu_core_num) { dev_err(smu->adev->dev, "core index is overflow, should be less than %d\n", smu->cpu_core_num); + return -EINVAL; } smu->cpu_core_id_select = input[0]; if (input[1] == 0) { |
