Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp226125ybt; Tue, 30 Jun 2020 19:17:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyORfG7e7WJTHhAn6LOvmXHNQcq+9EV1B88jW1rBSdp4BVrzbZGOFOSksFq4J2jSWOkTwQu X-Received: by 2002:a50:cd1a:: with SMTP id z26mr27363984edi.120.1593569859727; Tue, 30 Jun 2020 19:17:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593569859; cv=none; d=google.com; s=arc-20160816; b=Sq5EySw2Ma5ApLrJe1xru5LNAw559u1vqkOySPwMQyAQrSpchZTQGuDdO2LnvJUp9i W3S8hZDa4xu1ZIWiYXgz1Ghllna6nKYnQBIlgxWmAJQ2veTFytXIxuqBR0HsmCfhv9lD w6rz2T6S+K2kOx5pMOtu3vOCKECBfPzTO3t3rEazTX056zlQ1f/VMgu0bMvKuICpFbe5 vLGskc9ac+C0Dad1NUjVC1IJ0s6eqkoBPXb3V1Frot7LgoTPBW2A8jg3wwx71B6TdM23 gF2Ga0jswgVGhqnAOUPtT5Vvx7A0SYyUBuj6PIESeEXhVg9524d4SeLdnvl/kvGVmxPe AAbw== 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=cApl7NmRHPhQ5kw8fqS/rp3CHWmJM32iAO0URpP9rFM=; b=r11JvHvq/isW3dLvJ3WxIo4DCwphbLKSWGgEdmKDNeMsEyYjSq7Ye1AiAcfEzYYXv8 cMYsLz6EPqVaFZeoTQEE0ydlUVQlNiGl9PeB58kprpZkeBtzJsYIobXCd0wsEP0TJuY3 bQ9K4K3C/XP/JY7eQjbewKP03rYin/jkpvwMo4PU++vh8B9PDmsy53lzoBWlgsxW1QXy YlinSEzg//RpHGfUX1TSzT9NJ/+AtPpds4zme+oYsriJVjegEkuiMH5P9G2XrkRrdwuY YnhxahgsRXpu52Utf7kDxNqJT60RL6Djjqg2redonCBsdgGlj1O14d+Pc1Ws9+6Onxvd /b1A== 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 ds15si3975949ejc.14.2020.06.30.19.17.16; Tue, 30 Jun 2020 19:17:39 -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 S1726810AbgGACQj (ORCPT + 99 others); Tue, 30 Jun 2020 22:16:39 -0400 Received: from mail.loongson.cn ([114.242.206.163]:47716 "EHLO loongson.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726736AbgGACQh (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--.5801S13; Wed, 01 Jul 2020 10:16:30 +0800 (CST) From: Tiezhu Yang To: Thomas Gleixner , Jason Cooper , Marc Zyngier Cc: linux-kernel@vger.kernel.org, Markus Elfring Subject: [PATCH v4 11/14] irqchip/omap-intc: Fix potential resource leak Date: Wed, 1 Jul 2020 10:16:23 +0800 Message-Id: <1593569786-11500-12-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--.5801S13 X-Coremail-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C2KfnxnUUI43ZEXa7IU8Gii3UUUUU== 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 omap_init_irq_of(), system resource "omap_irq_base" was not released in the error case, fix it. Fixes: 8598066cddd1 ("arm: omap: irq: move irq.c to drivers/irqchip/") Signed-off-by: Tiezhu Yang --- drivers/irqchip/irq-omap-intc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-omap-intc.c b/drivers/irqchip/irq-omap-intc.c index d360a6e..e711530 100644 --- a/drivers/irqchip/irq-omap-intc.c +++ b/drivers/irqchip/irq-omap-intc.c @@ -254,8 +254,10 @@ static int __init omap_init_irq_of(struct device_node *node) omap_irq_soft_reset(); ret = omap_alloc_gc_of(domain, omap_irq_base); - if (ret < 0) + if (ret < 0) { irq_domain_remove(domain); + iounmap(omap_irq_base); + } return ret; } -- 2.1.0