From: Johan Hovold Date: Tue, 13 Sep 2022 08:53:19 +0000 (+0200) Subject: drm/msm/dp: drop modeset sanity checks X-Git-Tag: v6.6.17~5728^2~3^2~16^3~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f94eff09f3f36902a2996f075719b289cb91d758;p=platform%2Fkernel%2Flinux-rpi.git drm/msm/dp: drop modeset sanity checks Drop the overly defensive modeset sanity checks of function parameters which have already been checked or used by the callers. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Tested-by: Kuogee Hsieh Reviewed-by: Kuogee Hsieh Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/502674/ Link: https://lore.kernel.org/r/20220913085320.8577-10-johan+linaro@kernel.org Signed-off-by: Dmitry Baryshkov --- diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c index a49f6dbbe888..44676f0bb3ef 100644 --- a/drivers/gpu/drm/msm/dp/dp_display.c +++ b/drivers/gpu/drm/msm/dp/dp_display.c @@ -1600,20 +1600,10 @@ error: int msm_dp_modeset_init(struct msm_dp *dp_display, struct drm_device *dev, struct drm_encoder *encoder) { - struct msm_drm_private *priv; + struct msm_drm_private *priv = dev->dev_private; struct dp_display_private *dp_priv; int ret; - if (WARN_ON(!encoder) || WARN_ON(!dp_display) || WARN_ON(!dev)) - return -EINVAL; - - priv = dev->dev_private; - - if (priv->num_bridges == ARRAY_SIZE(priv->bridges)) { - DRM_DEV_ERROR(dev->dev, "too many bridges\n"); - return -ENOSPC; - } - dp_display->drm_dev = dev; dp_priv = container_of(dp_display, struct dp_display_private, dp_display);