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@xxxxxxxxxxx> Signed-off-by: Pawel Osciak <p.osciak@xxxxxxxxxxx> Signed-off-by: Kyungmin Park <kyungmin.park@xxxxxxxxxxx> --- Fix for 2.6.35 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 d4fd8a3..033aa12 100644 --- a/drivers/media/video/mem2mem_testdev.c +++ b/drivers/media/video/mem2mem_testdev.c @@ -1000,6 +1000,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: -- 1.7.1.240.g225c9 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html