From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D7F57C3DA7A for ; Wed, 28 Dec 2022 15:03:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233459AbiL1PDi (ORCPT ); Wed, 28 Dec 2022 10:03:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233453AbiL1PDg (ORCPT ); Wed, 28 Dec 2022 10:03:36 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A013BE7D for ; Wed, 28 Dec 2022 07:03:35 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3C5C461540 for ; Wed, 28 Dec 2022 15:03:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4E9E9C433D2; Wed, 28 Dec 2022 15:03:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1672239814; bh=YoL91z00/5hdJ7GmxEUF0moI34KCQSxeXtomwood/GU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MdwqBZnSIBIJZGgTb7tmBoCw/9RiZO0/LGS8vuLAmSKg5tseVqi2BMZIajhqW+DWL GhofsYLGWZUmf+JpeMitTK6NzvLxHmj94CzmC+44vvcx0yz8Ajayg6q5n9FPYTpHuQ QuGWMjeVBlJrohgX8C0vS8S+XL2RzeUpikudNcu8= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Yang Yingliang , Conor Dooley , Sasha Levin Subject: [PATCH 6.1 0046/1146] soc: sifive: ccache: fix missing free_irq() in error path in sifive_ccache_init() Date: Wed, 28 Dec 2022 15:26:25 +0100 Message-Id: <20221228144331.416100344@linuxfoundation.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221228144330.180012208@linuxfoundation.org> References: <20221228144330.180012208@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Yang Yingliang [ Upstream commit 756344e7cb1afbb87da8705c20384dddd0dea233 ] Add missing free_irq() before return error from sifive_ccache_init(). Fixes: a967a289f169 ("RISC-V: sifive_l2_cache: Add L2 cache controller driver for SiFive SoCs") Signed-off-by: Yang Yingliang Reviewed-by: Conor Dooley Signed-off-by: Conor Dooley Signed-off-by: Sasha Levin --- drivers/soc/sifive/sifive_ccache.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/soc/sifive/sifive_ccache.c b/drivers/soc/sifive/sifive_ccache.c index 25019c16d8ae..98269d056728 100644 --- a/drivers/soc/sifive/sifive_ccache.c +++ b/drivers/soc/sifive/sifive_ccache.c @@ -240,7 +240,7 @@ static int __init sifive_ccache_init(void) NULL); if (rc) { pr_err("Could not request IRQ %d\n", g_irq[i]); - goto err_unmap; + goto err_free_irq; } } @@ -254,6 +254,9 @@ static int __init sifive_ccache_init(void) #endif return 0; +err_free_irq: + while (--i >= 0) + free_irq(g_irq[i], NULL); err_unmap: iounmap(ccache_base); return rc; -- 2.35.1