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 X-Spam-Level: X-Spam-Status: No, score=-19.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 51ED3C4361A for ; Wed, 23 Dec 2020 03:04:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 33BFF20757 for ; Wed, 23 Dec 2020 03:04:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731484AbgLWDEi (ORCPT ); Tue, 22 Dec 2020 22:04:38 -0500 Received: from mail.kernel.org ([198.145.29.99]:46328 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728594AbgLWCTU (ORCPT ); Tue, 22 Dec 2020 21:19:20 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id F3CE223341; Wed, 23 Dec 2020 02:18:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1608689917; bh=I7LqFMNCjfFmLfJCVKzzcGtnmG3sTxorI68QB658CFM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LWPg/adnh+3H/z0f4oZ1i/SxTAIXbA+V/r11qyhxKGOCWGhjICZXwSwNxmaDVKwcy a9mc14lyXTVk0KMU00YQ7Xtsj7voFLSkS/n7gTo0WxC4QN3J5ceE4QuBqzNJmOBdkQ 82Vxdn3iV0Vw4/CIWTvbeep/h3a+tPxQbgLlcSlNHaeHnTi0izJ9wIyWxFJtXPloE7 R1NKeKkULpmkSSHmNDOZTRtXGBc82sjn5o/1diZv706D2inGzrpFQYGYh1RplDDJSG MVfAAnedibizaxNVS9SFWM0KlXC+FwdNIALUcXM8KkEJYiaFLvwGJ5xh2UhVeS4vb/ EISL8R2nHgfcw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Qinglang Miao , Thomas Bogendoerfer , Sasha Levin , linux-mips@vger.kernel.org Subject: [PATCH AUTOSEL 5.4 018/130] mips: ar7: add missing iounmap() on error in ar7_gpio_init Date: Tue, 22 Dec 2020 21:16:21 -0500 Message-Id: <20201223021813.2791612-18-sashal@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201223021813.2791612-1-sashal@kernel.org> References: <20201223021813.2791612-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Qinglang Miao [ Upstream commit 5a5aa912f687204d50455d0db36f94dd8de601c2 ] Add the missing iounmap() of gpch->regs before return from ar7_gpio_init() in the error handling case. Signed-off-by: Qinglang Miao Signed-off-by: Thomas Bogendoerfer Signed-off-by: Sasha Levin --- arch/mips/ar7/gpio.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/mips/ar7/gpio.c b/arch/mips/ar7/gpio.c index 2292e55c12e23..b7ad7a3ecb6d7 100644 --- a/arch/mips/ar7/gpio.c +++ b/arch/mips/ar7/gpio.c @@ -319,6 +319,7 @@ int __init ar7_gpio_init(void) if (ret) { printk(KERN_ERR "%s: failed to add gpiochip\n", gpch->chip.label); + iounmap(gpch->regs); return ret; } printk(KERN_INFO "%s: registered %d GPIOs\n", -- 2.27.0