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.barysh...@linaro.org>
Signed-off-by: Johan Hovold <johan+lin...@kernel.org>
---
 drivers/gpu/drm/msm/dp/dp_display.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/msm/dp/dp_display.c 
b/drivers/gpu/drm/msm/dp/dp_display.c
index 808a516e84c5..33daec11f813 100644
--- a/drivers/gpu/drm/msm/dp/dp_display.c
+++ b/drivers/gpu/drm/msm/dp/dp_display.c
@@ -1607,15 +1607,10 @@ static int dp_display_get_next_bridge(struct msm_dp *dp)
 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;
-- 
2.35.1

Reply via email to