From patchwork Thu Apr 14 13:11:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 561629 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 205F5C4707F for ; Thu, 14 Apr 2022 13:57:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345745AbiDNNyJ (ORCPT ); Thu, 14 Apr 2022 09:54:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345247AbiDNNpg (ORCPT ); Thu, 14 Apr 2022 09:45:36 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3EB812DE0; Thu, 14 Apr 2022 06:43:11 -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 sin.source.kernel.org (Postfix) with ESMTPS id B0F93CE29B0; Thu, 14 Apr 2022 13:43:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A173EC385A5; Thu, 14 Apr 2022 13:43:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649943788; bh=Av4wGFD4Vv4Q4vUT4eygWna39+HOs8NbMQ2KLMTg3QY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gTeHlSjpfV5r7cyKF5Vu6v6/U56cXoOXRsq83KU09MTvpdR4A7eDfYyLvVlKCB6xT B0YnXx2pKUy/WC6bBmTo/D443uw4349Q6zUTMkXWVOYyJMwy6BUECEKGPcFoUoDaQB Jl7RVu6gRU3BT7Y5R0sPqUvLJ21kP7p0lWkSYT+g= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, kernel test robot , Dan Carpenter , "Souptick Joarder (HPE)" , Marc Zyngier , Sasha Levin Subject: [PATCH 5.4 281/475] irqchip/nvic: Release nvic_base upon failure Date: Thu, 14 Apr 2022 15:11:06 +0200 Message-Id: <20220414110902.964720916@linuxfoundation.org> X-Mailer: git-send-email 2.35.2 In-Reply-To: <20220414110855.141582785@linuxfoundation.org> References: <20220414110855.141582785@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Souptick Joarder (HPE) [ Upstream commit e414c25e3399b2b3d7337dc47abccab5c71b7c8f ] smatch warning was reported as below -> smatch warnings: drivers/irqchip/irq-nvic.c:131 nvic_of_init() warn: 'nvic_base' not released on lines: 97. Release nvic_base upon failure. Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Souptick Joarder (HPE) Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220218163303.33344-1-jrdr.linux@gmail.com Signed-off-by: Sasha Levin --- drivers/irqchip/irq-nvic.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/irqchip/irq-nvic.c b/drivers/irqchip/irq-nvic.c index 160b39b5cd10..128a26d219e2 100644 --- a/drivers/irqchip/irq-nvic.c +++ b/drivers/irqchip/irq-nvic.c @@ -105,6 +105,7 @@ static int __init nvic_of_init(struct device_node *node, if (!nvic_irq_domain) { pr_warn("Failed to allocate irq domain\n"); + iounmap(nvic_base); return -ENOMEM; } @@ -114,6 +115,7 @@ static int __init nvic_of_init(struct device_node *node, if (ret) { pr_warn("Failed to allocate irq chips\n"); irq_domain_remove(nvic_irq_domain); + iounmap(nvic_base); return ret; }