Skip to content

Commit

Permalink
V4L/DVB: v4l: mem2mem_testdev: fix g_fmt NULL pointer dereference
Browse files Browse the repository at this point in the history
Calling g_fmt before s_fmt resulted in a NULL pointer dereference as no
default formats were being selected on probe.

Reported-by: Németh Márton <nm127@freemail.hu>
Signed-off-by: Pawel Osciak <p.osciak@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Pawel Osciak authored and Mauro Carvalho Chehab committed Jul 8, 2010
1 parent 9c3b10b commit b6ae906
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/media/video/mem2mem_testdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -988,6 +988,9 @@ static int m2mtest_probe(struct platform_device *pdev)
goto err_m2m;
}

q_data[V4L2_M2M_SRC].fmt = &formats[0];
q_data[V4L2_M2M_DST].fmt = &formats[0];

return 0;

err_m2m:
Expand Down

0 comments on commit b6ae906

Please sign in to comment.