summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/omapdrm
diff options
context:
space:
mode:
authorLaurent Pinchart2018-03-01 21:02:30 +0100
committerTomi Valkeinen2018-03-02 14:11:07 +0100
commitc39bbb903ce337a3f6a7fe0ac8d30e0876699fc2 (patch)
tree32c9a873220f942e3a45a555a606258681bff7a9 /drivers/gpu/drm/omapdrm
parentdrm/omap: cleanup color space conversion (diff)
downloadkernel-qcow2-linux-c39bbb903ce337a3f6a7fe0ac8d30e0876699fc2.tar.gz
kernel-qcow2-linux-c39bbb903ce337a3f6a7fe0ac8d30e0876699fc2.tar.xz
kernel-qcow2-linux-c39bbb903ce337a3f6a7fe0ac8d30e0876699fc2.zip
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: 7877632b4cd0 ("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>
Diffstat (limited to 'drivers/gpu/drm/omapdrm')
-rw-r--r--drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c b/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c
index f960e55d64ea..428de90fced1 100644
--- a/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c
+++ b/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c
@@ -778,13 +778,13 @@ static int dsicm_connect(struct omap_dss_device *dssdev)
goto err_connect;
}
- r = in->ops.dsi->request_vc(ddata->in, &ddata->channel);
+ r = in->ops.dsi->request_vc(in, &ddata->channel);
if (r) {
dev_err(dev, "failed to get virtual channel\n");
goto err_req_vc;
}
- r = in->ops.dsi->set_vc_id(ddata->in, ddata->channel, TCH);
+ r = in->ops.dsi->set_vc_id(in, ddata->channel, TCH);
if (r) {
dev_err(dev, "failed to set VC_ID\n");
goto err_vc_id;
@@ -794,7 +794,7 @@ static int dsicm_connect(struct omap_dss_device *dssdev)
return 0;
err_vc_id:
- in->ops.dsi->release_vc(ddata->in, ddata->channel);
+ in->ops.dsi->release_vc(in, ddata->channel);
err_req_vc:
in->ops.dsi->disconnect(in, dssdev);
err_connect: