]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/amdgpu: fix a reversed condition
authorRex Zhu <rex.zhu@amd.com>
Wed, 25 Jul 2018 03:51:46 +0000 (11:51 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 31 Jul 2018 21:58:12 +0000 (16:58 -0500)
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
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c

index 15a1192c1ec5472b9d4b51127cc7ad569eced99a..23fc1d32b937ec78c7dd6496f37f25140d2cb39d 100644 (file)
@@ -1185,7 +1185,7 @@ static ssize_t amdgpu_hwmon_show_vddnb(struct device *dev,
        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 */