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 93876C77B61 for ; Mon, 24 Apr 2023 13:22:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232077AbjDXNWe (ORCPT ); Mon, 24 Apr 2023 09:22:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47400 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232053AbjDXNWU (ORCPT ); Mon, 24 Apr 2023 09:22:20 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6507155B3 for ; Mon, 24 Apr 2023 06:22:08 -0700 (PDT) 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 C89DE62234 for ; Mon, 24 Apr 2023 13:22:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D3F78C433EF; Mon, 24 Apr 2023 13:22:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1682342526; bh=bwelsVxkOzj8FH6fmXQrjrrab8H2so4U//WTuhsiysY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oDDXVEyMtz5l6qdj4kt8IS2ZKFTlRn6z9yOou1Ks0vr0nmhFeVkyC4gSa8bv/5ZTq f9OdLH1x3fbt4NoUXQkrmdJaSLPqJQfnlGzHbniy9ngYtlKkHVKyiPg7+1L8MueSaW Otn04PTnuxV29XNhYjEUSZLz3j3tOvCBG/NncN5k= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Yang Yingliang , Conor Dooley Subject: [PATCH 5.15 72/73] soc: sifive: l2_cache: fix missing free_irq() in error path in sifive_l2_init() Date: Mon, 24 Apr 2023 15:17:26 +0200 Message-Id: <20230424131131.758489772@linuxfoundation.org> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230424131129.040707961@linuxfoundation.org> References: <20230424131129.040707961@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 commit 756344e7cb1afbb87da8705c20384dddd0dea233 upstream. Add missing free_irq() before return error from sifive_l2_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 [conor: ccache -> l2_cache] Signed-off-by: Conor Dooley Signed-off-by: Greg Kroah-Hartman --- drivers/soc/sifive/sifive_l2_cache.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- a/drivers/soc/sifive/sifive_l2_cache.c +++ b/drivers/soc/sifive/sifive_l2_cache.c @@ -221,7 +221,7 @@ static int __init sifive_l2_init(void) rc = request_irq(g_irq[i], l2_int_handler, 0, "l2_ecc", NULL); if (rc) { pr_err("L2CACHE: Could not request IRQ %d\n", g_irq[i]); - goto err_unmap; + goto err_free_irq; } } @@ -235,6 +235,9 @@ static int __init sifive_l2_init(void) #endif return 0; +err_free_irq: + while (--i >= 0) + free_irq(g_irq[i], NULL); err_unmap: iounmap(l2_base); return rc;