From patchwork Mon Jun 28 08:16:56 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pawel Osciak X-Patchwork-Id: 108321 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o5S8HCjB004698 for ; Mon, 28 Jun 2010 08:17:12 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753773Ab0F1IRK (ORCPT ); Mon, 28 Jun 2010 04:17:10 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:52732 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751439Ab0F1IRJ (ORCPT ); Mon, 28 Jun 2010 04:17:09 -0400 Received: from eu_spt2 (mailout2.w1.samsung.com [210.118.77.12]) by mailout2.w1.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTP id <0L4P00I96TOH6A@mailout2.w1.samsung.com> for linux-media@vger.kernel.org; Mon, 28 Jun 2010 09:17:05 +0100 (BST) Received: from linux.samsung.com ([106.116.38.10]) by spt2.w1.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTPA id <0L4P000KETOHGI@spt2.w1.samsung.com> for linux-media@vger.kernel.org; Mon, 28 Jun 2010 09:17:05 +0100 (BST) Received: from mcdsrvbld02.digital.local (unknown [106.116.37.23]) by linux.samsung.com (Postfix) with ESMTP id B6691270003; Mon, 28 Jun 2010 10:15:46 +0200 (CEST) Date: Mon, 28 Jun 2010 10:16:56 +0200 From: Pawel Osciak Subject: [PATCH] v4l: mem2mem_testdev: fix g_fmt NULL pointer dereference To: linux-media@vger.kernel.org Cc: p.osciak@samsung.com, kyungmin.park@samsung.com, nm127@freemail.hu Message-id: <1277713016-24339-1-git-send-email-p.osciak@samsung.com> MIME-version: 1.0 X-Mailer: git-send-email 1.7.1 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: 8BIT Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Mon, 28 Jun 2010 08:17:12 +0000 (UTC) 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: