[PATCH] drm/i915/sdvo: Fix harmless build warning
Dongdong Deng
dongdong.deng at windriver.com
Fri Oct 29 03:31:38 PDT 2010
Removing the following harmless build warning to let compiler happy.
drivers/gpu/drm/i915/intel_sdvo.c: In function 'intel_sdvo_mode_set':
drivers/gpu/drm/i915/intel_sdvo.c:1097: warning: 'rate' may be used
uninitialized in this function
Signed-off-by: Dongdong Deng <dongdong.deng at windriver.com>
CC: David Airlie <airlied at linux.ie>
CC: dri-devel at lists.freedesktop.org
---
drivers/gpu/drm/i915/intel_sdvo.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
index ee73e42..6899f90 100644
--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@ -1170,7 +1170,8 @@ static void intel_sdvo_mode_set(struct drm_encoder *encoder,
switch (sdvo_pixel_multiply) {
case 1: rate = SDVO_CLOCK_RATE_MULT_1X; break;
case 2: rate = SDVO_CLOCK_RATE_MULT_2X; break;
- case 4: rate = SDVO_CLOCK_RATE_MULT_4X; break;
+ case 4:
+ default: rate = SDVO_CLOCK_RATE_MULT_4X;
}
if (!intel_sdvo_set_clock_rate_mult(intel_sdvo, rate))
return;
--
1.6.0.4
More information about the dri-devel
mailing list