Browse Source

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 <damien.lespiau@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Damien Lespiau 12 năm trước cách đây
mục cha
commit
ad1c0b1974
1 tập tin đã thay đổi với 1 bổ sung2 xóa
  1. 1 2
      drivers/gpu/drm/i915/intel_dp.c

+ 1 - 2
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))