Quoting Laurent Pinchart (2021-03-21 20:01:22) > diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86.c b/drivers/gpu/drm/bridge/ti-sn65dsi86.c > index 1d1be791d5ba..c21a7f7d452b 100644 > --- a/drivers/gpu/drm/bridge/ti-sn65dsi86.c > +++ b/drivers/gpu/drm/bridge/ti-sn65dsi86.c > @@ -418,8 +420,18 @@ static int ti_sn_bridge_attach(struct drm_bridge *bridge, > } > pdata->dsi = dsi; > > + /* Attach the next bridge */ > + ret = drm_bridge_attach(bridge->encoder, pdata->next_bridge, > + &pdata->bridge, flags); > + if (ret < 0) { > + DRM_ERROR("failed to attach next bridge\n"); Can this be pushed into drm_bridge_attach() instead of in each caller? > + goto err_dsi_detach; > + } > + > return 0; > > +err_dsi_detach: > + mipi_dsi_detach(dsi); > err_dsi_attach: > mipi_dsi_device_unregister(dsi); > err_dsi_host: > static void ti_sn_bridge_post_disable(struct drm_bridge *bridge) > @@ -1245,6 +1249,14 @@ static int ti_sn_bridge_probe(struct i2c_client *client, > return ret; > } > > + pdata->next_bridge = devm_drm_panel_bridge_add(pdata->dev, > + pdata->panel); > + if (IS_ERR(pdata->next_bridge)) { > + DRM_ERROR("failed to create panel bridge\n"); > + ret = PTR_ERR(pdata->next_bridge); > + return ret; Just return PTR_ERR(pdata->next_bridge)? > + } > + > dev_set_drvdata(&client->dev, pdata);