summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/msm/dsi/dsi.c
diff options
context:
space:
mode:
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>2022-11-02 15:37:08 +0100
committerDmitry Baryshkov <dmitry.baryshkov@linaro.org>2022-11-02 15:37:08 +0100
commit9a5c1586e8098a19cbf3e7f5d6fa1d1d3c1efa13 (patch)
treeee36d7c718535ca99eea9a4185d95242897d9c7a /drivers/gpu/drm/msm/dsi/dsi.c
parentMerge tag 'drm-next-20221025' of git://linuxtv.org/pinchartl/media into drm-next (diff)
parentdrm/msm: Kconfig: Fix spelling mistake "throught" -> "through" (diff)
downloadlinux-9a5c1586e8098a19cbf3e7f5d6fa1d1d3c1efa13.tar.xz
linux-9a5c1586e8098a19cbf3e7f5d6fa1d1d3c1efa13.zip
Merge remote-tracking branch 'msm/msm-fixes' into HEAD
Diffstat (limited to 'drivers/gpu/drm/msm/dsi/dsi.c')
-rw-r--r--drivers/gpu/drm/msm/dsi/dsi.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/dsi/dsi.c b/drivers/gpu/drm/msm/dsi/dsi.c
index 39bbabb5daf6..8a95c744972a 100644
--- a/drivers/gpu/drm/msm/dsi/dsi.c
+++ b/drivers/gpu/drm/msm/dsi/dsi.c
@@ -218,6 +218,12 @@ int msm_dsi_modeset_init(struct msm_dsi *msm_dsi, struct drm_device *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;
+ }
+
msm_dsi->dev = dev;
ret = msm_dsi_host_modeset_init(msm_dsi->host, dev);