aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBiju Das <biju.das.jz@bp.renesas.com>2021-03-01 13:08:28 +0100
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-03-05 13:07:23 +0100
commitc4f27003ec3d84ef0c333c74ae2aff326537e583 (patch)
tree3616353075f82c2a1a75423c1e771dc8f6a7ee6e
parentd5f61bd4f82dc40a82128a06c02b964654a53cfb (diff)
media: v4l: vsp1: Fix uif null pointer access
RZ/G2L SoC has no UIF. This patch fixes null pointer access, when UIF module is not used. Fixes: 5e824f989e6e8("media: v4l: vsp1: Integrate DISCOM in display pipeline") Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-rw-r--r--drivers/media/platform/vsp1/vsp1_drm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/platform/vsp1/vsp1_drm.c b/drivers/media/platform/vsp1/vsp1_drm.c
index f6d2f47a4058..06f74d410973 100644
--- a/drivers/media/platform/vsp1/vsp1_drm.c
+++ b/drivers/media/platform/vsp1/vsp1_drm.c
@@ -462,9 +462,9 @@ static int vsp1_du_pipeline_setup_inputs(struct vsp1_device *vsp1,
* make sure it is present in the pipeline's list of entities if it
* wasn't already.
*/
- if (!use_uif) {
+ if (drm_pipe->uif && !use_uif) {
drm_pipe->uif->pipe = NULL;
- } else if (!drm_pipe->uif->pipe) {
+ } else if (drm_pipe->uif && !drm_pipe->uif->pipe) {
drm_pipe->uif->pipe = pipe;
list_add_tail(&drm_pipe->uif->list_pipe, &pipe->entities);
}

Privacy Policy