summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/msm/dsi/dsi.c
diff options
context:
space:
mode:
authorJohan Hovold <johan+linaro@kernel.org>2022-09-13 10:53:20 +0200
committerDmitry Baryshkov <dmitry.baryshkov@linaro.org>2022-11-04 15:39:38 +0100
commite512ed607fdac79b25448d4f2a4a8e8b6d546a02 (patch)
tree5ef4ad27df3425a5533a7cc18443101fe1fbc0f5 /drivers/gpu/drm/msm/dsi/dsi.c
parentMerge remote-tracking branch 'msm/msm-fixes' into HEAD (diff)
downloadlinux-e512ed607fdac79b25448d4f2a4a8e8b6d546a02.tar.xz
linux-e512ed607fdac79b25448d4f2a4a8e8b6d546a02.zip
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>
Diffstat (limited to 'drivers/gpu/drm/msm/dsi/dsi.c')
-rw-r--r--drivers/gpu/drm/msm/dsi/dsi.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/gpu/drm/msm/dsi/dsi.c b/drivers/gpu/drm/msm/dsi/dsi.c
index 8a95c744972a..31fdee2052be 100644
--- a/drivers/gpu/drm/msm/dsi/dsi.c
+++ b/drivers/gpu/drm/msm/dsi/dsi.c
@@ -211,14 +211,9 @@ void __exit msm_dsi_unregister(void)
int msm_dsi_modeset_init(struct msm_dsi *msm_dsi, struct drm_device *dev,
struct drm_encoder *encoder)
{
- struct msm_drm_private *priv;
+ struct msm_drm_private *priv = dev->dev_private;
int ret;
- if (WARN_ON(!encoder) || WARN_ON(!msm_dsi) || 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;