From patchwork Thu Jun 12 11:53:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sricharan R X-Patchwork-Id: 31822 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pb0-f72.google.com (mail-pb0-f72.google.com [209.85.160.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A1CDC20AE6 for ; Thu, 12 Jun 2014 11:58:18 +0000 (UTC) Received: by mail-pb0-f72.google.com with SMTP id ma3sf2612482pbc.3 for ; Thu, 12 Jun 2014 04:58:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=Xm03BRpgev9KO0MTq43ult3eQ83a7TB5siMrAUxQ6nw=; b=HtTb/SURa9hpkzNcCnYUvJ40C+iHrDtnbJjO3rJ4H0EpqTU89W5Dt1ZsItJb/2NIy0 4rQEXPXsAIIcYefLbP/dZvFoPnbimIbIecwH5mOV9avTCUZrLSSHDKkVIjnx8+lEV0V8 3RsNRa9xqzHDx4EtDS7t2/2x9SF61mjuskOb1OwX4+JTItDP2S6VbDuYFJGPJsiFj4MV Cy+4wuJUWZ861oXnFpmp7f2LTqxzfJtXfNfb9plTqxO3QbPsN9Bv8E+gxesf8mBbrFfH ACHuT3XX+wX5zIyKYho0/T9b5cGvXQ4sTf8nE6jviEagjyLVJj9wcIxf2Abxy4BOaED/ AnMg== X-Gm-Message-State: ALoCoQn6y0eRUS/GIcTmT2kqoyPRVLSu/r8+/zv96KxOQrSo5lEMexvDwKedBNzBwtHqdT7LdflF X-Received: by 10.66.155.165 with SMTP id vx5mr8457599pab.36.1402574297943; Thu, 12 Jun 2014 04:58:17 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.51.132 with SMTP id u4ls2965171qga.36.gmail; Thu, 12 Jun 2014 04:58:17 -0700 (PDT) X-Received: by 10.58.46.141 with SMTP id v13mr44922144vem.18.1402574297781; Thu, 12 Jun 2014 04:58:17 -0700 (PDT) Received: from mail-vc0-f173.google.com (mail-vc0-f173.google.com [209.85.220.173]) by mx.google.com with ESMTPS id w4si238851vct.72.2014.06.12.04.58.17 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 12 Jun 2014 04:58:17 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.173 as permitted sender) client-ip=209.85.220.173; Received: by mail-vc0-f173.google.com with SMTP id lf12so660923vcb.4 for ; Thu, 12 Jun 2014 04:58:17 -0700 (PDT) X-Received: by 10.221.29.137 with SMTP id ry9mr44757371vcb.6.1402574297668; Thu, 12 Jun 2014 04:58:17 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.54.6 with SMTP id vs6csp397210vcb; Thu, 12 Jun 2014 04:58:17 -0700 (PDT) X-Received: by 10.66.192.73 with SMTP id he9mr20864655pac.88.1402574296899; Thu, 12 Jun 2014 04:58:16 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z8si866049pas.122.2014.06.12.04.58.16; Thu, 12 Jun 2014 04:58:16 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933825AbaFLL5F (ORCPT + 27 others); Thu, 12 Jun 2014 07:57:05 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:58248 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933101AbaFLL4v (ORCPT ); Thu, 12 Jun 2014 07:56:51 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id s5CBuNbL009444; Thu, 12 Jun 2014 06:56:23 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id s5CBuNIr023655; Thu, 12 Jun 2014 06:56:23 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.174.1; Thu, 12 Jun 2014 06:56:23 -0500 Received: from uda0393807.india.ti.com. (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id s5CBtEc2008910; Thu, 12 Jun 2014 06:56:19 -0500 From: Sricharan R To: , , , CC: , , , , , , , Subject: [PATCH V2 13/19] irqchip: crossbar: change the goto naming Date: Thu, 12 Jun 2014 17:23:21 +0530 Message-ID: <1402574007-13987-14-git-send-email-r.sricharan@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1402574007-13987-1-git-send-email-r.sricharan@ti.com> References: <1402574007-13987-1-git-send-email-r.sricharan@ti.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: r.sricharan@ti.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.173 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Nishanth Menon Using err1,2,3,4 etc makes it hard to ensure a new exit path in the middle will not result in spurious changes, so rename the error paths as per the function it does. Signed-off-by: Nishanth Menon --- drivers/irqchip/irq-crossbar.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/irqchip/irq-crossbar.c b/drivers/irqchip/irq-crossbar.c index 524e6e9..cf0d79f 100644 --- a/drivers/irqchip/irq-crossbar.c +++ b/drivers/irqchip/irq-crossbar.c @@ -152,17 +152,17 @@ static int __init crossbar_of_init(struct device_node *node, cb->crossbar_base = of_iomap(node, 0); if (!cb->crossbar_base) - goto err1; + goto err_cb; of_property_read_u32(node, "ti,max-irqs", &max); if (!max) { pr_err("missing 'ti,max-irqs' property\n"); ret = -EINVAL; - goto err2; + goto err_base; } cb->irq_map = kcalloc(max, sizeof(int), GFP_KERNEL); if (!cb->irq_map) - goto err2; + goto err_base; cb->int_max = max; @@ -181,7 +181,7 @@ static int __init crossbar_of_init(struct device_node *node, if (entry > max) { pr_err("Invalid reserved entry\n"); ret = -EINVAL; - goto err3; + goto err_irq_map; } cb->irq_map[entry] = IRQ_RESERVED; } @@ -189,7 +189,7 @@ static int __init crossbar_of_init(struct device_node *node, cb->register_offsets = kcalloc(max, sizeof(int), GFP_KERNEL); if (!cb->register_offsets) - goto err3; + goto err_irq_map; of_property_read_u32(node, "ti,reg-size", &size); @@ -206,7 +206,7 @@ static int __init crossbar_of_init(struct device_node *node, default: pr_err("Invalid reg-size property\n"); ret = -EINVAL; - goto err4; + goto err_reg_offset; break; } @@ -234,7 +234,7 @@ static int __init crossbar_of_init(struct device_node *node, if (entry > max) { pr_err("Invalid skip entry\n"); ret = -EINVAL; - goto err4; + goto err_reg_offset; } cb->irq_map[entry] = IRQ_SKIP; } @@ -251,13 +251,13 @@ static int __init crossbar_of_init(struct device_node *node, register_routable_domain_ops(&routable_irq_domain_ops); return 0; -err4: +err_reg_offset: kfree(cb->register_offsets); -err3: +err_irq_map: kfree(cb->irq_map); -err2: +err_base: iounmap(cb->crossbar_base); -err1: +err_cb: kfree(cb); return ret; }