| From | Greg Kroah-Hartman <> | Subject | [PATCH 4.18 157/197] drm/amdgpu: fix a reversed condition | Date | Thu, 13 Sep 2018 15:31:46 +0200 |
| |
4.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rex Zhu <rex.zhu@amd.com>
commit ccf9ef0b0d10434dec5046bcfc4e834a7b1830fd upstream.
This test was reversed so it would end up leading to vddnb value can't be read via hwmon on APU.
Reviewed-by: Evan Quan <evan.quan@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c @@ -1157,7 +1157,7 @@ static ssize_t amdgpu_hwmon_show_vddnb(s int r, size = sizeof(vddnb); /* only APUs have vddnb */ - if (adev->flags & AMD_IS_APU) + if (!(adev->flags & AMD_IS_APU)) return -EINVAL; /* Can't get voltage when the card is off */
|