Explorar o código

drm/amdgpu: fix a reversed condition

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
Rex Zhu %!s(int64=7) %!d(string=hai) anos
pai
achega
ccf9ef0b0d
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c

+ 1 - 1
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c

@@ -1185,7 +1185,7 @@ static ssize_t amdgpu_hwmon_show_vddnb(struct device *dev,
 	int r, size = sizeof(vddnb);
 	int r, size = sizeof(vddnb);
 
 
 	/* only APUs have vddnb */
 	/* only APUs have vddnb */
-	if  (adev->flags & AMD_IS_APU)
+	if  (!(adev->flags & AMD_IS_APU))
 		return -EINVAL;
 		return -EINVAL;
 
 
 	/* Can't get voltage when the card is off */
 	/* Can't get voltage when the card is off */