mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-26 04:20:23 +09:00
drm/amd/pm: fix error code in smu_set_power_limit()
[ Upstream commitbbdfe5aaef] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
486642baea
commit
cabed6027a
@@ -2001,6 +2001,7 @@ int smu_set_power_limit(struct smu_context *smu, 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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user