Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Laurent Pinchart and committed by
Tomi Valkeinen
c39bbb90 4cba7071

+3 -3
+3 -3
drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c
··· 778 778 goto err_connect; 779 779 } 780 780 781 - r = in->ops.dsi->request_vc(ddata->in, &ddata->channel); 781 + r = in->ops.dsi->request_vc(in, &ddata->channel); 782 782 if (r) { 783 783 dev_err(dev, "failed to get virtual channel\n"); 784 784 goto err_req_vc; 785 785 } 786 786 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); 788 788 if (r) { 789 789 dev_err(dev, "failed to set VC_ID\n"); 790 790 goto err_vc_id; ··· 794 794 return 0; 795 795 796 796 err_vc_id: 797 - in->ops.dsi->release_vc(ddata->in, ddata->channel); 797 + in->ops.dsi->release_vc(in, ddata->channel); 798 798 err_req_vc: 799 799 in->ops.dsi->disconnect(in, dssdev); 800 800 err_connect: