Skip to content

Commit f94eff0

Browse files
jhovoldlumag
authored andcommitted
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 <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Tested-by: Kuogee Hsieh <[email protected]> Reviewed-by: Kuogee Hsieh <[email protected]> Reviewed-by: Abhinav Kumar <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/502674/ Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
1 parent af309c0 commit f94eff0

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

drivers/gpu/drm/msm/dp/dp_display.c

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1600,20 +1600,10 @@ static int dp_display_get_next_bridge(struct msm_dp *dp)
16001600
int msm_dp_modeset_init(struct msm_dp *dp_display, struct drm_device *dev,
16011601
struct drm_encoder *encoder)
16021602
{
1603-
struct msm_drm_private *priv;
1603+
struct msm_drm_private *priv = dev->dev_private;
16041604
struct dp_display_private *dp_priv;
16051605
int ret;
16061606

1607-
if (WARN_ON(!encoder) || WARN_ON(!dp_display) || WARN_ON(!dev))
1608-
return -EINVAL;
1609-
1610-
priv = dev->dev_private;
1611-
1612-
if (priv->num_bridges == ARRAY_SIZE(priv->bridges)) {
1613-
DRM_DEV_ERROR(dev->dev, "too many bridges\n");
1614-
return -ENOSPC;
1615-
}
1616-
16171607
dp_display->drm_dev = dev;
16181608

16191609
dp_priv = container_of(dp_display, struct dp_display_private, dp_display);

0 commit comments

Comments
 (0)