drm/amd/pm: fix error code in smu_set_power_limit()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 14 Apr 2021 05:59:22 +0000 (08:59 +0300)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 15 Apr 2021 20:32:45 +0000 (16:32 -0400)
commitbbdfe5aaef3c1d5c5e62fa235ef13f064e4c1c17
tree0868cc448f0a0e3028d835105f9ef4ffd88b3c88
parent90cb3d8aca1baea9471d28f28d5de1528dd5e424
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: e098bc9612c2 ("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>
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c