From: Colin Ian King colin.king@canonical.com
ret is not being initialized, so there is a possibility that a garbage value is being returned by kv_dpm_late_enable(). Initialize ret to 0 to fix this.
Signed-off-by: Colin Ian King colin.king@canonical.com --- drivers/gpu/drm/radeon/kv_dpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
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)) {
-----Original Message----- From: Colin King [mailto:colin.king@canonical.com] Sent: Thursday, February 06, 2014 12:18 PM To: David Airlie; Deucher, Alexander; dri-devel@lists.freedesktop.org Subject: [PATCH] drm/radeon/dpm: ensure ret is not returning uninitialized value
From: Colin Ian King colin.king@canonical.com
ret is not being initialized, so there is a possibility that a garbage value is being returned by kv_dpm_late_enable(). Initialize ret to 0 to fix this.
Signed-off-by: Colin Ian King colin.king@canonical.com
Thanks. Already have the same fix from Dave Jones applied to my fixes tree.
Alex
drivers/gpu/drm/radeon/kv_dpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
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)) {
-- 1.9.rc1
dri-devel@lists.freedesktop.org