Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp226285ybt; Tue, 30 Jun 2020 19:18:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx7gGxQxUGeXUSKwNPN6cz+kFPg6fSK2XIdKrXccN7f8FqEcW/YwkY5htYgC3Fnp4YPpgsS X-Received: by 2002:a17:906:e91:: with SMTP id p17mr13531705ejf.252.1593569885460; Tue, 30 Jun 2020 19:18:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593569885; cv=none; d=google.com; s=arc-20160816; b=E6PoSiTdsLbasI+oqMabi6QFnSyiOxf3fdAV8Vqi3/mfUDtehBzxIZrLd6yuJvkuDf WIvFuPY8WElMmKKqDxMqpCBqgNTaJoD1hA2JTlCWlYdTJQ8DINnEaiIokkrG6BLm1lDc fs8Nbn+oWE2hmenp2IN4QWrf5MEg3gZkde/daeGGZROMcW/PhW/glmyLp+5q0I0KGdnM HP6Ln83LA0HovaAjH170SV+Z2C4DXTWwid9IRmWgPcXd3q7u2aY3797TAsli7dDpCm8r ivPJN+FZ1uEvzhOPkPHAay0H9iahotZtrlk1jHo6DlVE7sOs4DBmzvSJaADuxLPrrAGV R00A== 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=Gm4CU6usbp9tShXevgtRn6+OJu3urXD9ELDDkUinGF4=; b=eLsSsHLYbiLdd48XaoLNA74Tz1cAAjzn51RFkcSiQ7dsfGVnUpPn5v1/VZ2+q9Af3+ DsqFq22Ygnye8+rPfSK0DJsoYjbeXKJUIHbWf8uxNSBMIgX8OFNzEyYo0uEjpTw42mQZ 4Jms6nm+mzX0BkphtK0Xe5BN5bzzBN4j3jtsLQ408KVUtNMM0M50PGH1ZYi2gyrlr4zc oZT61XawCG+eVkYGQpr0yvWmfv2/4HGfrXy13V4KRIEV03LDzm5rRu3KgN7EzdRx+A04 pwALcmk2cH2pyjRnhEAbeUo1NqXFyXdjTp4JjgRS16BbF8zbUOrc49ectfhhv3ndLFb7 yxbg== 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 p13si2796671edh.504.2020.06.30.19.17.42; Tue, 30 Jun 2020 19:18:05 -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 S1726955AbgGACRA (ORCPT + 99 others); Tue, 30 Jun 2020 22:17:00 -0400 Received: from mail.loongson.cn ([114.242.206.163]:47664 "EHLO loongson.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726739AbgGACQh (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--.5801S14; 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 12/14] irqchip/riscv-intc: Fix potential resource leak Date: Wed, 1 Jul 2020 10:16:24 +0800 Message-Id: <1593569786-11500-13-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--.5801S14 X-Co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SsGvfC2KfnxnUUI43ZEXa7IU8Gii3UUUUU== 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 riscv_intc_init(), system resource "intc_domain" was not released in the error case, fix it. Fixes: 6b7ce8927b5a ("irqchip: RISC-V per-HART local interrupt controller driver") Signed-off-by: Tiezhu Yang --- drivers/irqchip/irq-riscv-intc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/irqchip/irq-riscv-intc.c b/drivers/irqchip/irq-riscv-intc.c index a6f97fa..8d6286c 100644 --- a/drivers/irqchip/irq-riscv-intc.c +++ b/drivers/irqchip/irq-riscv-intc.c @@ -122,6 +122,7 @@ static int __init riscv_intc_init(struct device_node *node, rc = set_handle_irq(&riscv_intc_irq); if (rc) { pr_err("failed to set irq handler\n"); + irq_domain_remove(intc_domain); return rc; } -- 2.1.0