diff options
author | Ernst Sjöstrand <ernstp@gmail.com> | 2019-06-24 17:15:41 +0200 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-06-25 13:23:39 -0500 |
commit | 70c5350a878d945a2f6a947817260b8d373b7680 (patch) | |
tree | 6d953b9d29dffc0d5580d50f2ad6e6b26381a1c6 /drivers/gpu/drm | |
parent | 616ae02f6c81da410163abe721a350ef6fa0d504 (diff) |
drm/amd/amdgpu: amdgpu_hwmon_show_temp: initialize temp
Reported by smatch:
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c:1496 amdgpu_hwmon_show_temp() error: uninitialized symbol 'temp'.
Signed-off-by: Ernst Sjöstrand <ernstp@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c index 302307c00f83..704c7034da09 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c @@ -1462,7 +1462,7 @@ static ssize_t amdgpu_hwmon_show_temp(struct device *dev, struct amdgpu_device *adev = dev_get_drvdata(dev); struct drm_device *ddev = adev->ddev; int channel = to_sensor_dev_attr(attr)->index; - int r, temp, size = sizeof(temp); + int r, temp = 0, size = sizeof(temp); /* Can't get temperature when the card is off */ if ((adev->flags & AMD_IS_PX) && |