Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/msm/dsi: 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 <dmitry.baryshkov@linaro.org>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Tested-by: Kuogee Hsieh <quic_khsieh@quicinc.com>
Reviewed-by: Kuogee Hsieh <quic_khsieh@quicinc.com>
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Patchwork: https://patchwork.freedesktop.org/patch/502678/
Link: https://lore.kernel.org/r/20220913085320.8577-11-johan+linaro@kernel.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

authored by

Johan Hovold and committed by
Dmitry Baryshkov
e512ed60 9a5c1586

+1 -6
+1 -6
drivers/gpu/drm/msm/dsi/dsi.c
··· 211 211 int msm_dsi_modeset_init(struct msm_dsi *msm_dsi, struct drm_device *dev, 212 212 struct drm_encoder *encoder) 213 213 { 214 - struct msm_drm_private *priv; 214 + struct msm_drm_private *priv = dev->dev_private; 215 215 int ret; 216 - 217 - if (WARN_ON(!encoder) || WARN_ON(!msm_dsi) || WARN_ON(!dev)) 218 - return -EINVAL; 219 - 220 - priv = dev->dev_private; 221 216 222 217 if (priv->num_bridges == ARRAY_SIZE(priv->bridges)) { 223 218 DRM_DEV_ERROR(dev->dev, "too many bridges\n");