From patchwork Sun Sep 23 17:39:21 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 1495661 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 62CB340214 for ; Sun, 23 Sep 2012 17:39:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754308Ab2IWRji (ORCPT ); Sun, 23 Sep 2012 13:39:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:32673 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754119Ab2IWRjh (ORCPT ); Sun, 23 Sep 2012 13:39:37 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q8NHdQw1017157 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 23 Sep 2012 13:39:26 -0400 Received: from [10.97.7.49] (vpn1-7-49.gru2.redhat.com [10.97.7.49]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q8NHdMXY013464 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sun, 23 Sep 2012 13:39:24 -0400 Message-ID: <505F4949.2090509@redhat.com> Date: Sun, 23 Sep 2012 14:39:21 -0300 From: Mauro Carvalho Chehab User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120828 Thunderbird/15.0 MIME-Version: 1.0 To: Laurent Pinchart , Peter Senna Tschudin CC: kernel-janitors@vger.kernel.org, Julia.Lawall@lip6.fr, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Fwd: [PATCH 5/5] drivers/media/platform/omap3isp/isp.c: fix error return code References: <1346775269-12191-1-git-send-email-peter.senna@gmail.com> In-Reply-To: <1346775269-12191-1-git-send-email-peter.senna@gmail.com> X-Enigmail-Version: 1.4.4 X-Forwarded-Message-Id: <1346775269-12191-1-git-send-email-peter.senna@gmail.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Laurent, Could you please review this patch? Peter, Please, always c/c the driver maintainer/author on patches you submit. You can check it with scripts/get_maintainer.pl. Regards, Mauro -------- Mensagem original -------- Assunto: [PATCH 5/5] drivers/media/platform/omap3isp/isp.c: fix error return code Data: Tue, 4 Sep 2012 18:14:25 +0200 De: Peter Senna Tschudin Para: Mauro Carvalho Chehab CC: kernel-janitors@vger.kernel.org, Julia.Lawall@lip6.fr, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org From: Peter Senna Tschudin Convert a nonnegative error return code to a negative one, as returned elsewhere in the function. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // ( if@p1 (\(ret < 0\|ret != 0\)) { ... return ret; } | ret@p1 = 0 ) ... when != ret = e1 when != &ret *if(...) { ... when != ret = e2 when forall return ret; } // Signed-off-by: Peter Senna Tschudin --- drivers/media/platform/omap3isp/isp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/media/platform/omap3isp/isp.c b/drivers/media/platform/omap3isp/isp.c index e0096e0..91fcaef 100644 --- a/drivers/media/platform/omap3isp/isp.c +++ b/drivers/media/platform/omap3isp/isp.c @@ -2102,8 +2102,10 @@ static int __devinit isp_probe(struct platform_device *pdev) if (ret < 0) goto error; - if (__omap3isp_get(isp, false) == NULL) + if (__omap3isp_get(isp, false) == NULL) { + ret = -EBUSY; /* Not sure if EBUSY is best for here */ goto error; + } ret = isp_reset(isp); if (ret < 0)