summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/kv_dpm.c
diff options
context:
space:
mode:
authorDave Jones <davej@redhat.com>2014-01-30 21:17:30 -0500
committerAlex Deucher <alexander.deucher@amd.com>2014-02-06 12:22:49 -0500
commit7c7e867cf0f74c4c79649605b964510041f1a8bf (patch)
tree770dff0efe69330c581a909c473beb4665f3239a /drivers/gpu/drm/radeon/kv_dpm.c
parent4dbffb8f21999c2156ddac00186810f1dfd9eb1a (diff)
downloadop-kernel-dev-7c7e867cf0f74c4c79649605b964510041f1a8bf.zip
op-kernel-dev-7c7e867cf0f74c4c79649605b964510041f1a8bf.tar.gz
drm/radeon/dpm: fix uninitialized read from stack in kv_dpm_late_enable
If we take the false branch of the if quoted in the diff below, we end up doing a return ret, without ever having initialized it. Picked up by coverity. Signed-off-by: Dave Jones <davej@fedoraproject.org> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/kv_dpm.c')
-rw-r--r--drivers/gpu/drm/radeon/kv_dpm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/kv_dpm.c b/drivers/gpu/drm/radeon/kv_dpm.c
index b6e01d5..351db36 100644
--- a/drivers/gpu/drm/radeon/kv_dpm.c
+++ b/drivers/gpu/drm/radeon/kv_dpm.c
@@ -1223,7 +1223,7 @@ int kv_dpm_enable(struct radeon_device *rdev)
int kv_dpm_late_enable(struct radeon_device *rdev)
{
- int ret;
+ int ret = 0;
if (rdev->irq.installed &&
r600_is_internal_thermal_sensor(rdev->pm.int_thermal_type)) {
OpenPOWER on IntegriCloud