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 90F6CC433FE for ; Tue, 5 Apr 2022 09:52:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345965AbiDEJoO (ORCPT ); Tue, 5 Apr 2022 05:44:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239648AbiDEIUX (ORCPT ); Tue, 5 Apr 2022 04:20:23 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9DB242B5; Tue, 5 Apr 2022 01:18:12 -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 ams.source.kernel.org (Postfix) with ESMTPS id 46123B81A37; Tue, 5 Apr 2022 08:18:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 965CEC385A0; Tue, 5 Apr 2022 08:18:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649146690; bh=hUw5GvYClpR87kollzuNvmjc3unATiZOHiuZijPqx/s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0uMHznzkcnsoBZ/PMC8m3IcOWcxzMEOWCgXwLz9xYwS1ThagJlQkoR48IaWVN+ryd uOEbhnu4ItvA4ZJDnE0mbAcredheD4cj2O4GdJr/3WjMdIYPWfZ/mEbRjXEw9IiV+g qQKLqunUoP0fC5iQ4UjcTfj+sEGQBkfCXwK4FbLU= 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.17 0854/1126] irqchip/nvic: Release nvic_base upon failure Date: Tue, 5 Apr 2022 09:26:41 +0200 Message-Id: <20220405070432.611534486@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070407.513532867@linuxfoundation.org> References: <20220405070407.513532867@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 ba4759b3e269..94230306e0ee 100644 --- a/drivers/irqchip/irq-nvic.c +++ b/drivers/irqchip/irq-nvic.c @@ -107,6 +107,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; } @@ -116,6 +117,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; } -- 2.34.1