[PATCH]: radeon: Fix uninitialized variable warning in atombios_crtc_set_pll()

Prarit Bhargava prarit at redhat.com
Thu May 27 15:22:16 PDT 2010


Fixes:

drivers/gpu/drm/radeon/atombios_crtc.c: In function ‘atombios_crtc_set_pll’:
drivers/gpu/drm/radeon/atombios_crtc.c:678: error: ‘pll’ may be used uninitialized in this function

Signed-off-by: Prarit Bhargava <prarit at redhat.com>

diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c b/drivers/gpu/drm/radeon/atombios_crtc.c
index 3feca6a..520deae 100644
--- a/drivers/gpu/drm/radeon/atombios_crtc.c
+++ b/drivers/gpu/drm/radeon/atombios_crtc.c
@@ -675,7 +675,7 @@ static void atombios_crtc_set_pll(struct drm_crtc *crtc, struct drm_display_mode
 	union set_pixel_clock args;
 	u32 pll_clock = mode->clock;
 	u32 ref_div = 0, fb_div = 0, frac_fb_div = 0, post_div = 0;
-	struct radeon_pll *pll;
+	struct radeon_pll *(uninitialized_var(pll);
 	u32 adjusted_clock;
 	int encoder_mode = 0;
 


More information about the dri-devel mailing list