diff options
author | Pawel Osciak <p.osciak@samsung.com> | 2010-06-22 05:38:41 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-07-08 16:50:24 -0300 |
commit | b6ae906b04113cb73c1ffe9c42fbcdcb074d9f07 (patch) | |
tree | 01ff8392bcd9035b2e9bdad87eb170622a4a7775 | |
parent | 9c3b10b53875279306d8464fe9b24fa634329fc8 (diff) | |
download | blackbird-op-linux-b6ae906b04113cb73c1ffe9c42fbcdcb074d9f07.tar.gz blackbird-op-linux-b6ae906b04113cb73c1ffe9c42fbcdcb074d9f07.zip |
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.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/video/mem2mem_testdev.c b/drivers/media/video/mem2mem_testdev.c index 554eaf140128..10ddeccc70eb 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: |