From patchwork Thu Mar 7 12:57:53 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sylwester Nawrocki/Kernel \\(PLT\\) /SRPOL/Staff Engineer/Samsung Electronics" X-Patchwork-Id: 2231491 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 2AFA3DF223 for ; Thu, 7 Mar 2013 12:58:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758341Ab3CGM6U (ORCPT ); Thu, 7 Mar 2013 07:58:20 -0500 Received: from mailout1.samsung.com ([203.254.224.24]:58166 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753095Ab3CGM6U (ORCPT ); Thu, 7 Mar 2013 07:58:20 -0500 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MJA00K6XK0UQ060@mailout1.samsung.com> for linux-media@vger.kernel.org; Thu, 07 Mar 2013 21:58:18 +0900 (KST) X-AuditID: cbfee61b-b7fb06d000000f28-ed-51388eea65c8 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 86.1B.03880.AEE88315; Thu, 07 Mar 2013 21:58:18 +0900 (KST) Received: from amdc1344.digital.local ([106.116.147.32]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MJA009ISK0SAK40@mmp1.samsung.com> for linux-media@vger.kernel.org; Thu, 07 Mar 2013 21:58:18 +0900 (KST) From: Sylwester Nawrocki To: linux-media@vger.kernel.org Cc: Andrzej Hajda , Sylwester Nawrocki , Kyungmin Park Subject: [PATCH] m5mols: Fix bug in stream on handler Date: Thu, 07 Mar 2013 13:57:53 +0100 Message-id: <1362661073-11646-1-git-send-email-s.nawrocki@samsung.com> X-Mailer: git-send-email 1.7.9.5 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrFJMWRmVeSWpSXmKPExsVy+t9jAd1XfRaBBrvfilv0bNjK6sDo8XmT XABjFJdNSmpOZllqkb5dAlfGrLOPmQvmc1Ys6b/K2MD4lr2LkZNDQsBEYk9rPyuELSZx4d56 ti5GLg4hgUWMEtf2rGGCcFYwSZy++4YFpIpNwFCi92gfI4gtIiAv8aT3BlgHs0Azo8StkxfY QBLCAqYSJ3f0MYPYLAKqEufOXgRr4BVwk1i99BiQzQG0TkFiziSbCYzcCxgZVjGKphYkFxQn peca6RUn5haX5qXrJefnbmIE+/CZ9A7GVQ0WhxgFOBiVeHg35pgHCrEmlhVX5h5ilOBgVhLh TW+zCBTiTUmsrEotyo8vKs1JLT7EKM3BoiTOy3jqSYCQQHpiSWp2ampBahFMlomDU6qBkYH5 GZdy+039BlanrZ9beIwbn6nZJxzQ+ap17t50rykXLlk0FzO5SeTVHpXoqph+SXnpoevc+2J6 zjfPF1r9J1K3i9d9Y57mgZy5p36GnD6axOikVPXv1DYH/wMa53z4nZOleM5fSP996LiZgMFs 15du/aUu0ZFSP09wafGu0dWa8nu11OpAJZbijERDLeai4kQA/fLAnt0BAAA= Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org From: Andrzej Hajda Due to improper condition check streaming start for some pixel formats was prevent and the s_stream just reatuned -EINVAL. This fixes regression introduced in commit 5565a2ad47cdd8e697 [media] m5mols: Protect driver data with a mutex. Cc: stable@vger.kernel.org # 3.7 Signed-off-by: Andrzej Hajda Signed-off-by: Sylwester Nawrocki Signed-off-by: Kyungmin Park --- drivers/media/i2c/m5mols/m5mols_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/i2c/m5mols/m5mols_core.c b/drivers/media/i2c/m5mols/m5mols_core.c index d4e7567..0b899cb 100644 --- a/drivers/media/i2c/m5mols/m5mols_core.c +++ b/drivers/media/i2c/m5mols/m5mols_core.c @@ -724,7 +724,7 @@ static int m5mols_s_stream(struct v4l2_subdev *sd, int enable) if (enable) { if (is_code(code, M5MOLS_RESTYPE_MONITOR)) ret = m5mols_start_monitor(info); - if (is_code(code, M5MOLS_RESTYPE_CAPTURE)) + else if (is_code(code, M5MOLS_RESTYPE_CAPTURE)) ret = m5mols_start_capture(info); else ret = -EINVAL;