drm/i915/fdi: convert BUG()'s to MISSING_CASE()
authorJani Nikula <jani.nikula@intel.com>
Wed, 25 Aug 2021 15:47:52 +0000 (18:47 +0300)
committerJani Nikula <jani.nikula@intel.com>
Fri, 27 Aug 2021 08:43:57 +0000 (11:43 +0300)
These shouldn't happen, but in the off chance they do, we'll want a
warning rather than panic.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/b86132ac63f43f79e51eb63f948beccba85bf449.1629906431.git.jani.nikula@intel.com
drivers/gpu/drm/i915/display/intel_fdi.c

index cc83a65..fc09b78 100644 (file)
@@ -93,7 +93,8 @@ static int ilk_check_fdi_lanes(struct drm_device *dev, enum pipe pipe,
                }
                return 0;
        default:
-               BUG();
+               MISSING_CASE(pipe);
+               return 0;
        }
 }
 
@@ -217,7 +218,7 @@ static void ivb_update_fdi_bc_bifurcation(const struct intel_crtc_state *crtc_st
 
                break;
        default:
-               BUG();
+               MISSING_CASE(crtc->pipe);
        }
 }