mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 00:53:34 +02:00
drm/amd/pm: fix error code in smu_set_power_limit()
We should return -EINVAL instead of success if the "limit" is too high.
Fixes: e098bc9612 ("drm/amd/pm: optimize the power related source code layout")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
90cb3d8aca
commit
bbdfe5aaef
|
|
@ -2221,6 +2221,7 @@ static int smu_set_power_limit(void *handle, uint32_t limit)
|
|||
dev_err(smu->adev->dev,
|
||||
"New power limit (%d) is over the max allowed %d\n",
|
||||
limit, smu->max_power_limit);
|
||||
ret = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user