Message ID | 1592902276-3969-3-git-send-email-yangtiezhu@loongson.cn (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=C9iy=AE=lists.infradead.org=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@kernel.org> Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C6A2F6C1 for <patchwork-linux-arm@patchwork.kernel.org>; Tue, 23 Jun 2020 08:54:20 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A010020723 for <patchwork-linux-arm@patchwork.kernel.org>; Tue, 23 Jun 2020 08:54:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="oGgERqFC" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A010020723 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=loongson.cn Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References:In-Reply-To:Message-Id:Date:Subject:To: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=1nVAoWlHXAd9tFQ1dxwcvj6/wovVekXf3LtISt8OYmw=; b=oGgERqFCPX47/hLTFDAuxLSrk/ GDxijOkXAxz/N1ZGoHceMS43uc3SyQ2fQVdC0p2aduG0T11TfvQZD0jrdvbGq8fyL1jnHtO0qiZMo 6RdWs7ElgMUEVhkeR//uNQOHKsmOFK5v+OscpEKcSh6L4tqG69d5tw1dTE9JhZuA+yiR+VYrtY0AD 14BDqFLb+KgCc7EEh29y7NQ6VEzYyhbbRBAcZyyWgrKEs9sNS7+G5cghqhAm0wXH0vt00AVdIsVbt gd7xmYc5tNF2Q8RkyCFVaDeT448JtIi5MMDtiy5MS/W/5juU7cDXBzOMbkHQE3jzpopH7YSz3Lknb 9zfCQfIg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnefV-0002ou-Gp; Tue, 23 Jun 2020 08:52:37 +0000 Received: from mail.loongson.cn ([114.242.206.163] helo=loongson.cn) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnefE-0002bN-2r; Tue, 23 Jun 2020 08:52:21 +0000 Received: from linux.localdomain (unknown [113.200.148.30]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9Dxv2uFwvFecLBIAA--.12S4; Tue, 23 Jun 2020 16:51:23 +0800 (CST) From: Tiezhu Yang <yangtiezhu@loongson.cn> To: Thomas Gleixner <tglx@linutronix.de>, Jason Cooper <jason@lakedaemon.net>, Marc Zyngier <maz@kernel.org>, Rob Herring <robh+dt@kernel.org> Subject: [PATCH 2/7] irqchip/loongson-htpic: Remove redundant kfree operation Date: Tue, 23 Jun 2020 16:51:11 +0800 Message-Id: <1592902276-3969-3-git-send-email-yangtiezhu@loongson.cn> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1592902276-3969-1-git-send-email-yangtiezhu@loongson.cn> References: <1592902276-3969-1-git-send-email-yangtiezhu@loongson.cn> X-CM-TRANSID: AQAAf9Dxv2uFwvFecLBIAA--.12S4 X-Coremail-Antispam: 1UD129KBjvdXoWrtr15XrW5ZrW3AF15Kr4xtFb_yoW3twb_Cr WIqr9rJFW0gr1rC3y7ur47ZrySkw4kW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ed X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: devicetree@vger.kernel.org, Baruch Siach <baruch@tkos.co.il>, Albert Ou <aou@eecs.berkeley.edu>, Tony Lindgren <tony@atomide.com>, linux-mips@vger.kernel.org, Michal Simek <michal.simek@xilinx.com>, Jiaxun Yang <jiaxun.yang@flygoat.com>, linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-omap@vger.kernel.org, Kukjin Kim <kgene@kernel.org>, Guo Ren <guoren@kernel.org>, Krzysztof Kozlowski <krzk@kernel.org>, Paul Walmsley <paul.walmsley@sifive.com>, Huacai Chen <chenhc@lemote.com>, linux-riscv@lists.infradead.org, linux-csky@vger.kernel.org, Xuefeng Li <lixuefeng@loongson.cn>, Palmer Dabbelt <palmer@dabbelt.com>, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org |
Series |
Fix potential resource leaks and do some code cleanups about irqchip
|
expand
|
diff --git a/drivers/irqchip/irq-loongson-htpic.c b/drivers/irqchip/irq-loongson-htpic.c index dd018c2..63f7280 100644 --- a/drivers/irqchip/irq-loongson-htpic.c +++ b/drivers/irqchip/irq-loongson-htpic.c @@ -93,10 +93,8 @@ int __init htpic_of_init(struct device_node *node, struct device_node *parent) } htpic = kzalloc(sizeof(*htpic), GFP_KERNEL); - if (!htpic) { - err = -ENOMEM; - goto out_free; - } + if (!htpic) + return -ENOMEM; htpic->base = of_iomap(node, 0); if (!htpic->base) {
In the function htpic_of_init(), when kzalloc htpic fails, it should return -ENOMEM directly, no need to execute "goto" to kfree. Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn> --- drivers/irqchip/irq-loongson-htpic.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)