From patchwork Thu Jun 26 07:10:28 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sricharan R X-Patchwork-Id: 32529 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f197.google.com (mail-ob0-f197.google.com [209.85.214.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E4491201EF for ; Thu, 26 Jun 2014 07:14:06 +0000 (UTC) Received: by mail-ob0-f197.google.com with SMTP id uz6sf17193269obc.0 for ; Thu, 26 Jun 2014 00:14:06 -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=c1+bzzrN1Yn/MUlHqNQAGsuJeifAZ/YpLwqVhiNXZHI=; b=ki6HN3f25zsvBlED3/wYkcgE0fdw82Z8Z2KZKTswMcNlf9vt3MkZpMfQZhH39G+eRk jLkTdp2Jmk7QP/tZSep56Rzzf5lWyNjnMolGeABXreOmnCdOxIA/gi97avBp06eZqXu0 3/8yA/0DFoMiHy2nHu5CpJuGJA//i2rKv+mjJFVVsiqjrTn0D/zxzx0ZhFw4yH6SeNky Qj7/C0u95Uxj6ppcOTMLtX+ri0I5uI5wwlm1y33J9u4hjjkghXOQfHakk97EkLoWXsDo uXv/RNV8fNxVcYb2GyHqM1Nc78wdiMfygoIy4kJVfGstq6x+z3SZCDev0cy0HG+09tQK HHvA== X-Gm-Message-State: ALoCoQn0RRx1O439WLrHRufdiSTiJTyg893tgi1wx6cpfBx3EauFguE8sH3Hocr05qprpmsRwjx0 X-Received: by 10.42.208.72 with SMTP id gb8mr6047898icb.24.1403766846417; Thu, 26 Jun 2014 00:14:06 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.101.78 with SMTP id t72ls110625qge.32.gmail; Thu, 26 Jun 2014 00:14:06 -0700 (PDT) X-Received: by 10.220.202.69 with SMTP id fd5mr566438vcb.43.1403766846328; Thu, 26 Jun 2014 00:14:06 -0700 (PDT) Received: from mail-ve0-f175.google.com (mail-ve0-f175.google.com [209.85.128.175]) by mx.google.com with ESMTPS id kk9si3829013vdb.77.2014.06.26.00.14.06 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 26 Jun 2014 00:14:06 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.175 as permitted sender) client-ip=209.85.128.175; Received: by mail-ve0-f175.google.com with SMTP id jx11so3199228veb.20 for ; Thu, 26 Jun 2014 00:14:06 -0700 (PDT) X-Received: by 10.58.243.1 with SMTP id wu1mr11824690vec.27.1403766846244; Thu, 26 Jun 2014 00:14:06 -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.37.5 with SMTP id tc5csp10250vcb; Thu, 26 Jun 2014 00:14:05 -0700 (PDT) X-Received: by 10.68.229.68 with SMTP id so4mr18616050pbc.110.1403766845516; Thu, 26 Jun 2014 00:14:05 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id uz10si8574561pbc.54.2014.06.26.00.14.04; Thu, 26 Jun 2014 00:14:04 -0700 (PDT) Received-SPF: none (google.com: devicetree-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 S1755743AbaFZHOA (ORCPT + 8 others); Thu, 26 Jun 2014 03:14:00 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:48367 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755731AbaFZHN6 (ORCPT ); Thu, 26 Jun 2014 03:13:58 -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 s5Q7DOAd013854; Thu, 26 Jun 2014 02:13:24 -0500 Received: from DLEE70.ent.ti.com (dlemailx.itg.ti.com [157.170.170.113]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id s5Q7DOIt025810; Thu, 26 Jun 2014 02:13:24 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.174.1; Thu, 26 Jun 2014 02:13:24 -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 s5Q7CTSb000852; Thu, 26 Jun 2014 02:13:19 -0500 From: Sricharan R To: , , , CC: , , , , , , , , Subject: [PATCH V4 10/16] irqchip: crossbar: Change the goto naming Date: Thu, 26 Jun 2014 12:40:28 +0530 Message-ID: <1403766634-18543-11-git-send-email-r.sricharan@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1403766634-18543-1-git-send-email-r.sricharan@ti.com> References: <1403766634-18543-1-git-send-email-r.sricharan@ti.com> MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: devicetree@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.175 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 Acked-by: Santosh Shilimkar --- 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 10d723d..afc35fd 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; }