From patchwork Tue Sep 4 16:14:25 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Senna Tschudin X-Patchwork-Id: 1403261 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 DA010DF280 for ; Tue, 4 Sep 2012 16:16:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757367Ab2IDQOw (ORCPT ); Tue, 4 Sep 2012 12:14:52 -0400 Received: from mail-wg0-f44.google.com ([74.125.82.44]:51844 "EHLO mail-wg0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757277Ab2IDQOv (ORCPT ); Tue, 4 Sep 2012 12:14:51 -0400 Received: by wgbdr13 with SMTP id dr13so5825722wgb.1 for ; Tue, 04 Sep 2012 09:14:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=NC/zhP4tNqYygeyNDk+WzbLnXEn3GF6V7xwU/LQGduE=; b=JOVg6hVmOBWvH/nReabqTmXw+i6gRhjOBDSqMhI7FSROnFMiwaJK2k8L9u4xGY3r8R 7xVwwzKHrxxoGFGqmRY3KpqUHUk4DBiO4gaRpgITV1GEfezHRTPg6zaV/lBhnNRyTpK2 EPL6E6q5b5/yVNGFsZtIrKwhmVhJuv4LQXvIVWw+aGPvPvwtHggmH/VovOskxq1T5xEw scih1iD/2kBSCCrX56N9RLlMtSwx+Ph9zjBwHjHJnBudq8YutDbJixvr/5baJf/D8Piw dtyEZzO5Q+berXtbE7sKFBQTSFD+ZDgex9xWEIcHQiy/ZhnURgB+OKglzIL7nAKxzo12 O5cg== Received: by 10.180.14.8 with SMTP id l8mr31754919wic.6.1346775289444; Tue, 04 Sep 2012 09:14:49 -0700 (PDT) Received: from localhost.localdomain ([132.227.100.38]) by mx.google.com with ESMTPS id l6sm24969613wiz.4.2012.09.04.09.14.48 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 04 Sep 2012 09:14:48 -0700 (PDT) From: Peter Senna Tschudin To: Mauro Carvalho Chehab Cc: kernel-janitors@vger.kernel.org, Julia.Lawall@lip6.fr, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/5] drivers/media/platform/omap3isp/isp.c: fix error return code Date: Tue, 4 Sep 2012 18:14:25 +0200 Message-Id: <1346775269-12191-1-git-send-email-peter.senna@gmail.com> X-Mailer: git-send-email 1.7.11.4 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@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)