V4L/DVB: v4l: mem2mem_testdev: fix g_fmt NULL pointer dereference

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>
This commit is contained in:
Pawel Osciak 2010-06-22 05:38:41 -03:00 committed by Mauro Carvalho Chehab
parent 9c3b10b538
commit b6ae906b04
1 changed files with 3 additions and 0 deletions

View File

@ -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: