Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp226224ybt; Tue, 30 Jun 2020 19:17:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxajIdepWcIMawP8qeRNIDIg7AKJrWD0VULbuhi1gmitiiTrjWX1Kglr1ymUV8XHDOe2rVh X-Received: by 2002:a05:6402:3d0:: with SMTP id t16mr25479571edw.287.1593569875082; Tue, 30 Jun 2020 19:17:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593569875; cv=none; d=google.com; s=arc-20160816; b=oA4tZHhciVfhJrFa/mpYZGYs8YpXDWi79VyOTW8uhJpRVF/Mge1MPGbIemPPD74SnY q5+CXyllBZD8pnWeJgKOEc2/VLszBHkYjbI7rMmOfBgHKEmvDWnvxyjqm7xhcRgcLGTR vJTFapTEi/0UNBnYKUVugfAQ7xN3AkAuN+dq/tk5OQQZGN4twiFdiqRiWNN9WycUMS9/ p5kdTUm6bIyCfs29+ahNHlRwzr60Yvwmvys4I0z7Mc8yQzw4a9ygsiSiaQ+/0QFbrym3 Fgw8Rgy/3FI7M174cEi57lGTFh6pX5wB4Lm5hgsc+7mSiCyR5EjogopiQqc6iFfXEfpx rIMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=HCsxHE8SIpnOaJg1aXWimIsbFe+W6/aCelffyfaxrgg=; b=0UBgPx/aSdFWUOxJbcClvxYC9NEu8k5gnXyRGeAfN5i2fGZehDT28ia0mfxBE+t3W5 VFvwt8dpqgiq04eVRPad3+S+O5nq6eqBpnnNn5v6kOMpfFOQoFdydNrgIseQGyKSudOe b2aVZKIfPVJSm/Vt/RiKi5NgWtE2aCD31B/7Y0iQfpdTC7t0UbbLYIOq0ML3/oNYIXpE iHm3h8/yRNCLE1CEpNSav1i2IQAquq4HKraxrXUX4d0o8x1YhnL9RAV8S0o9eFyKX9lG 8jFEWERzdDS2uoZSdYAN8NeJlBvLs3fvheheOJXcBQc3kIcsK15c9gqy0Y1vd6o58di1 NwKg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s23si3014380eji.327.2020.06.30.19.17.32; Tue, 30 Jun 2020 19:17:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726936AbgGACQ5 (ORCPT + 99 others); Tue, 30 Jun 2020 22:16:57 -0400 Received: from mail.loongson.cn ([114.242.206.163]:47692 "EHLO loongson.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726358AbgGACQh (ORCPT ); Tue, 30 Jun 2020 22:16:37 -0400 Received: from linux.localdomain (unknown [113.200.148.30]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9Dxz2r68fteU2dNAA--.5801S16; Wed, 01 Jul 2020 10:16:31 +0800 (CST) From: Tiezhu Yang To: Thomas Gleixner , Jason Cooper , Marc Zyngier Cc: linux-kernel@vger.kernel.org, Markus Elfring Subject: [PATCH v4 14/14] irqchip/xilinx-intc: Fix potential resource leak Date: Wed, 1 Jul 2020 10:16:26 +0800 Message-Id: <1593569786-11500-15-git-send-email-yangtiezhu@loongson.cn> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1593569786-11500-1-git-send-email-yangtiezhu@loongson.cn> References: <1593569786-11500-1-git-send-email-yangtiezhu@loongson.cn> X-CM-TRANSID: AQAAf9Dxz2r68fteU2dNAA--.5801S16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rUvcSsGvfC2KfnxnUUI43ZEXa7IU8Gii3UUUUU== X-CM-SenderInfo: p1dqw3xlh2x3gn0dqz5rrqw2lrqou0/ Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In the function xilinx_intc_of_init(), system resource "irqc->root_domain" was not released in the error case. Thus add jump target for the completion of the desired exception handling. Fixes: 9689c99e4950 ("irqchip/xilinx: Add support for parent intc") Signed-off-by: Tiezhu Yang --- drivers/irqchip/irq-xilinx-intc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-xilinx-intc.c b/drivers/irqchip/irq-xilinx-intc.c index 1d3d273..dcc51e0 100644 --- a/drivers/irqchip/irq-xilinx-intc.c +++ b/drivers/irqchip/irq-xilinx-intc.c @@ -241,7 +241,7 @@ static int __init xilinx_intc_of_init(struct device_node *intc, } else { pr_err("irq-xilinx: interrupts property not in DT\n"); ret = -EINVAL; - goto error; + goto error_domain_remove; } } else { primary_intc = irqc; @@ -250,6 +250,8 @@ static int __init xilinx_intc_of_init(struct device_node *intc, return 0; +error_domain_remove: + irq_domain_remove(irqc->root_domain); error: iounmap(irqc->base); kfree(irqc); -- 2.1.0