summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPawel Osciak <p.osciak@samsung.com>2010-06-22 05:38:41 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-07-08 16:50:24 -0300
commitb6ae906b04113cb73c1ffe9c42fbcdcb074d9f07 (patch)
tree01ff8392bcd9035b2e9bdad87eb170622a4a7775
parent9c3b10b53875279306d8464fe9b24fa634329fc8 (diff)
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>
-rw-r--r--drivers/media/video/mem2mem_testdev.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/video/mem2mem_testdev.c b/drivers/media/video/mem2mem_testdev.c
index 554eaf14012..10ddeccc70e 100644
--- a/drivers/media/video/mem2mem_testdev.c
+++ b/drivers/media/video/mem2mem_testdev.c
@@ -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: