diff options
author | Pawel Osciak <p.osciak@samsung.com> | 2010-06-22 04:38:41 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-07-08 15:50:24 -0400 |
commit | b6ae906b04113cb73c1ffe9c42fbcdcb074d9f07 (patch) | |
tree | 01ff8392bcd9035b2e9bdad87eb170622a4a7775 | |
parent | 9c3b10b53875279306d8464fe9b24fa634329fc8 (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.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) | |||
988 | goto err_m2m; | 988 | goto err_m2m; |
989 | } | 989 | } |
990 | 990 | ||
991 | q_data[V4L2_M2M_SRC].fmt = &formats[0]; | ||
992 | q_data[V4L2_M2M_DST].fmt = &formats[0]; | ||
993 | |||
991 | return 0; | 994 | return 0; |
992 | 995 | ||
993 | err_m2m: | 996 | err_m2m: |