Skip to content

Commit c39bbb9

Browse files
pinchartltomba
authored andcommitted
drm: omapdrm: displays: panel-dsi-cm: Fix field access before set
The driver accesses the ddata->in field before it gets set in the dsicm_connect() function. Use the local in pointer variable instead. Fixes: 7877632 ("drm: omapdrm: displays: Get panel source at connect time") Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
1 parent 4cba707 commit c39bbb9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -778,13 +778,13 @@ static int dsicm_connect(struct omap_dss_device *dssdev)
778778
goto err_connect;
779779
}
780780

781-
r = in->ops.dsi->request_vc(ddata->in, &ddata->channel);
781+
r = in->ops.dsi->request_vc(in, &ddata->channel);
782782
if (r) {
783783
dev_err(dev, "failed to get virtual channel\n");
784784
goto err_req_vc;
785785
}
786786

787-
r = in->ops.dsi->set_vc_id(ddata->in, ddata->channel, TCH);
787+
r = in->ops.dsi->set_vc_id(in, ddata->channel, TCH);
788788
if (r) {
789789
dev_err(dev, "failed to set VC_ID\n");
790790
goto err_vc_id;
@@ -794,7 +794,7 @@ static int dsicm_connect(struct omap_dss_device *dssdev)
794794
return 0;
795795

796796
err_vc_id:
797-
in->ops.dsi->release_vc(ddata->in, ddata->channel);
797+
in->ops.dsi->release_vc(in, ddata->channel);
798798
err_req_vc:
799799
in->ops.dsi->disconnect(in, dssdev);
800800
err_connect:

0 commit comments

Comments
 (0)