From patchwork Mon Sep 17 08:15:27 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: 1466051 Return-Path: X-Original-To: patchwork-linux-omap@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 F0497DFFFF for ; Mon, 17 Sep 2012 08:17:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754836Ab2IQIQw (ORCPT ); Mon, 17 Sep 2012 04:16:52 -0400 Received: from mail-wi0-f178.google.com ([209.85.212.178]:41626 "EHLO mail-wi0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750752Ab2IQIPl (ORCPT ); Mon, 17 Sep 2012 04:15:41 -0400 Received: by wibhr14 with SMTP id hr14so2155693wib.1 for ; Mon, 17 Sep 2012 01:15:39 -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:in-reply-to:references; bh=G1NUVAlyPdEVnQFzsgx3P+snsL0nLU4SqhzM10FgXMo=; b=Qf1nAvCAwEeupIjQBGEPLGYZanbioY8LS6Tnz9meOq1EKc3X015p1GVn66fwMmZ99B 931Y2Vwr6WNErpus6fAoKk4v2WvPn+8KAz5zeja52Z1L9cNjPfoM4Gfs2987ZxsbxTtM J0Ztmg5BzwjCTfq8/6ggWXlSjghkeYLZ34PKyWgfXm9lLKoAbj2zKH72y4NLUaVOZYuU K/dNvvjRc3oWuGfV7UWtSPnSa8YNaazuZqyPDiclFuAD0LfEPn9EVYPbdRT9pvDKQvml MvK1LnJBm9OKiuCwyE/XRLG2pb/ORnvGlD3xCxdL63y9fBs+Fj82Us+Exek4XhYj9+ti B/8w== Received: by 10.216.135.148 with SMTP id u20mr5453842wei.137.1347869739897; Mon, 17 Sep 2012 01:15:39 -0700 (PDT) Received: from ace.home.fr (ppeter.rsr.lip6.fr. [132.227.76.16]) by mx.google.com with ESMTPS id eu4sm16677669wib.2.2012.09.17.01.15.39 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 17 Sep 2012 01:15:39 -0700 (PDT) From: Peter Senna Tschudin To: svenkatr@ti.com Cc: cjb@laptop.org, linux-mmc@vger.kernel.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Peter Senna Tschudin Subject: [PATCH 3/4] drivers/mmc/host/omap_hsmmc.c: fix error return code Date: Mon, 17 Sep 2012 10:15:27 +0200 Message-Id: <1347869728-2696-3-git-send-email-peter.senna@gmail.com> X-Mailer: git-send-email 1.7.11.4 In-Reply-To: <1347869728-2696-1-git-send-email-peter.senna@gmail.com> References: <1347869728-2696-1-git-send-email-peter.senna@gmail.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@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 Acked-by: Venkatraman S --- drivers/mmc/host/omap_hsmmc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index e59ac62..c8a2b36 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -1893,6 +1893,7 @@ static int __devinit omap_hsmmc_probe(struct platform_device *pdev) if (pdata->init(&pdev->dev) != 0) { dev_dbg(mmc_dev(host->mmc), "Unable to configure MMC IRQs\n"); + ret = -ENXIO; goto err_irq_cd_init; } }