Skip to content

Commit 465fd41

Browse files
bijudasgregkh
authored andcommitted
media: v4l: vsp1: Fix uif null pointer access
commit 6732f31 upstream. RZ/G2L SoC has no UIF. This patch fixes null pointer access, when UIF module is not used. Fixes: 5e824f9("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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 17c6d69 commit 465fd41

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎drivers/media/platform/vsp1/vsp1_drm.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -462,9 +462,9 @@ static int vsp1_du_pipeline_setup_inputs(struct vsp1_device *vsp1,
462462
* make sure it is present in the pipeline's list of entities if it
463463
* wasn't already.
464464
*/
465-
if (!use_uif) {
465+
if (drm_pipe->uif && !use_uif) {
466466
drm_pipe->uif->pipe = NULL;
467-
} else if (!drm_pipe->uif->pipe) {
467+
} else if (drm_pipe->uif && !drm_pipe->uif->pipe) {
468468
drm_pipe->uif->pipe = pipe;
469469
list_add_tail(&drm_pipe->uif->list_pipe, &pipe->entities);
470470
}

0 commit comments

Comments
 (0)