From: Damien Lespiau Date: Thu, 7 Mar 2013 15:30:28 +0000 (+0000) Subject: drm/i915: Use BUG() in a case of a programming error X-Git-Tag: v4.0~3715^2~131^2~284 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ad1c0b1974c31f16407f983b7e6ea3511ec2a726;p=platform%2Fkernel%2Flinux-amlogic.git drm/i915: Use BUG() in a case of a programming error The port number should always be correctly set. Do the same thing as the switch above and use BUG() to signal that branch is not supposed to be taken. Signed-off-by: Damien Lespiau Reviewed-by: Paulo Zanoni Signed-off-by: Daniel Vetter --- diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 662a185..2f2ec42 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -2836,8 +2836,7 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port, name = "DPDDC-D"; break; default: - WARN(1, "Invalid port %c\n", port_name(port)); - break; + BUG(); } if (is_edp(intel_dp))