From patchwork Mon Jun 16 11:23:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sricharan R X-Patchwork-Id: 31940 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f199.google.com (mail-qc0-f199.google.com [209.85.216.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 213D420E7A for ; Mon, 16 Jun 2014 11:26:46 +0000 (UTC) Received: by mail-qc0-f199.google.com with SMTP id l6sf12388297qcy.2 for ; Mon, 16 Jun 2014 04:26:45 -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=QHUfVkS7xQdWqC07xQL5mEO7s5WnW14DWd4Dg0oiwbE=; b=lmPv4c5JZMf8qQC2n3GPjw7zTVBz91SQFN+s0cKhXHNyQiCjfzMISYmROp5m7lTJgp EiVAQrOHyL3p+wzN1c4oHZhNBeXcoUX4iQRa7af3frC4HhS7Eyc1Swi9KLXPioSDlz1O mWIXRdNe6pOzvCQq3+2RguUC+w6fYiqPOyhTPuQqVrGopHgeJc4i7/oLBjNMi3gjbaLd 9t3vNd916Jw3y7F1a1zel45KptgFNKoZ6nOH9LXG+quBgjjwCwbEaxN9IZ/axaPQMb0h VCBTp6qqZL7K+0XzMpgt+XzQFT12bCNl38X0y36+wvV8LCJbBSK0zWwjz53pHRm7cJ3v GHkQ== X-Gm-Message-State: ALoCoQkts9kBGoDVdCos8SPk1whWnlWhNB15qarjDt8/1OHmtNBWYkZhA2MwAgyPQ7kUd+M3vxeB X-Received: by 10.224.114.83 with SMTP id d19mr1862637qaq.1.1402918005977; Mon, 16 Jun 2014 04:26:45 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.94.100 with SMTP id f91ls383000qge.65.gmail; Mon, 16 Jun 2014 04:26:45 -0700 (PDT) X-Received: by 10.52.53.36 with SMTP id y4mr87389vdo.56.1402918005889; Mon, 16 Jun 2014 04:26:45 -0700 (PDT) Received: from mail-ve0-f173.google.com (mail-ve0-f173.google.com [209.85.128.173]) by mx.google.com with ESMTPS id p6si3989270vcj.37.2014.06.16.04.26.45 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 16 Jun 2014 04:26:45 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.173 as permitted sender) client-ip=209.85.128.173; Received: by mail-ve0-f173.google.com with SMTP id db11so5828979veb.18 for ; Mon, 16 Jun 2014 04:26:45 -0700 (PDT) X-Received: by 10.58.56.71 with SMTP id y7mr4776549vep.24.1402918005777; Mon, 16 Jun 2014 04:26:45 -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 vs6csp127298vcb; Mon, 16 Jun 2014 04:26:45 -0700 (PDT) X-Received: by 10.66.180.34 with SMTP id dl2mr23618411pac.124.1402918004979; Mon, 16 Jun 2014 04:26:44 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cw3si10621487pbc.117.2014.06.16.04.26.44; Mon, 16 Jun 2014 04:26:44 -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 S1755409AbaFPL0g (ORCPT + 9 others); Mon, 16 Jun 2014 07:26:36 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:43262 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751414AbaFPL0d (ORCPT ); Mon, 16 Jun 2014 07:26:33 -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 s5GBQ1UR019175; Mon, 16 Jun 2014 06:26:01 -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 s5GBQ0fh026057; Mon, 16 Jun 2014 06:26:01 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.174.1; Mon, 16 Jun 2014 06:26:00 -0500 Received: from uda0393807.india.ti.com. (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id s5GBOx47008965; Mon, 16 Jun 2014 06:25:56 -0500 From: Sricharan R To: , , , CC: , , , , , , , , Subject: [PATCH V3 10/16] irqchip: crossbar: change the goto naming Date: Mon, 16 Jun 2014 16:53:10 +0530 Message-ID: <1402917796-31574-11-git-send-email-r.sricharan@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1402917796-31574-1-git-send-email-r.sricharan@ti.com> References: <1402917796-31574-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.128.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 Signed-off-by: Sricharan R --- drivers/irqchip/irq-crossbar.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/drivers/irqchip/irq-crossbar.c b/drivers/irqchip/irq-crossbar.c index 5bcedc0..5bd7f3d 100644 --- a/drivers/irqchip/irq-crossbar.c +++ b/drivers/irqchip/irq-crossbar.c @@ -140,17 +140,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; @@ -169,7 +169,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; } @@ -187,7 +187,7 @@ static int __init crossbar_of_init(struct device_node *node) if (entry > max) { pr_err("Invalid skip entry\n"); ret = -EINVAL; - goto err3; + goto err_irq_map; } cb->irq_map[entry] = IRQ_SKIP; } @@ -196,7 +196,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); @@ -213,7 +213,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; } @@ -230,7 +230,6 @@ static int __init crossbar_of_init(struct device_node *node) } of_property_read_u32(node, "ti,irqs-safe-map", &cb->safe_map); - /* Initialize the crossbar with safe map to start with */ for (i = 0; i < max; i++) { if (cb->irq_map[i] == IRQ_RESERVED || @@ -243,13 +242,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; }