linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* drm/radeon/dpm: fix uninitialized read from stack in kv_dpm_late_enable
@ 2014-01-31  2:17 Dave Jones
  2014-01-31 14:21 ` Deucher, Alexander
  0 siblings, 1 reply; 2+ messages in thread
From: Dave Jones @ 2014-01-31  2:17 UTC (permalink / raw)
  To: Linux Kernel Mailing List; +Cc: alexander.deucher

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>
 
diff --git a/drivers/gpu/drm/radeon/kv_dpm.c b/drivers/gpu/drm/radeon/kv_dpm.c
index b6e01d5d2cce..351db361239d 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)) {

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-01-31 14:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-31  2:17 drm/radeon/dpm: fix uninitialized read from stack in kv_dpm_late_enable Dave Jones
2014-01-31 14:21 ` Deucher, Alexander

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).