Skip to content

Commit

Permalink
drm/amdgpu: fix a reversed condition
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Rex Zhu authored and Alex Deucher committed Jul 31, 2018
1 parent 8a50bb4 commit ccf9ef0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit ccf9ef0

Please sign in to comment.