Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp5458784pxu; Tue, 22 Dec 2020 18:42:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJwnP7fqK8OgmhdWMXUXCjmDuO6+X9syP44dHdBt9uCqCVnMmDVQZzkv1/CTbnbNtDZkXoyP X-Received: by 2002:a17:907:1692:: with SMTP id hc18mr15527967ejc.26.1608691324546; Tue, 22 Dec 2020 18:42:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608691324; cv=none; d=google.com; s=arc-20160816; b=UVxLYjmwdeb420KlVieAvVH2/8Yck1X0EH66hID4GSp8cG0KDKDYTRBcTZi2inT/p1 VOgoRRQSWFklZmLBk1yE9/ANye43f0pU2LotxHvAoldGtHT5vHd4Bv+a3IrOr30UTAoF egZytyPyUJc7vWUzaLKkampcRiesqZ6D1jZHNqVu0vQWH1PnsgmUqttQusWm8jZKHaqs guzamp605VSUTFd3XsOHvlvMhom6dGtCOSr1gwA5keYvStUtcL1Cj7ewLL/C/NePxwHw xPZ5ryD0szQ0PKUXnwhL9ZX92ohjKUAFUDsO2DU6M660NhR9n6C6RIAmtA787So3myx6 h/Ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Uxvyk9XyRcljP41Z+rMOzVAqRyYyK/qOcA44M42YZ1o=; b=oTnFv54+NDucdQy1xYJq1Bqd0kkqvWfz1zj34r1eMRaqsIv/ThVRE9TRiRsDxTtuZH 5KTxxdC+tyximff6dXWMzMfxYyv+jhE5Js6lJh6gPP4q0cIDA2fQxOXgpgjjZV7TjUgo wyR7EmPp7uLs7BERnwJcTKS7TJRSmCjNs5WgKnr9vQsp4j5tBYPjKtkM0SI9N2q61lGL waF8j2228U4aYUkydgDJEKVWi3Qg3P+6PPhE6wRkoHTsjTT1nr9Ue5uvbjJ+yEUEadGT q4EmeYA8CK89+0X5Zdp4Z3RLkA0J/unV67N3zbOFCk5bbZIQj05NstHV2YwKhgT56xFZ Jq5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="GXiVuHD/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id pw18si11122791ejb.163.2020.12.22.18.41.41; Tue, 22 Dec 2020 18:42:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="GXiVuHD/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729540AbgLWCle (ORCPT + 99 others); Tue, 22 Dec 2020 21:41:34 -0500 Received: from mail.kernel.org ([198.145.29.99]:52526 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729979AbgLWCXY (ORCPT ); Tue, 22 Dec 2020 21:23:24 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0D072225AB; Wed, 23 Dec 2020 02:23:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1608690184; bh=w5ONGt/8KxfidV2FLhfW7qk8ftC55R9vQyakaZ64OHQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GXiVuHD/Uce7lRdiBaizWeFPx2AZp7aUD0cThPHJM+oEoh7JzbmK9NzM6qp2IRv15 dsbfH3EFJx6tbpJfybzQo24J0l0x3Ic5PyClTXEuKDfQRCn5RszCkqC6knuhuDIZbn TPBnsBX9wGBzKJtN4I8p/Q22OZqkv+m6zLpL+HFro/UocOgHVBnLfpnul7jU7Tq9Pc p5QhUI/kbsavkxWmnrsMqN+VjEHuDb9nkZTDde620I4prgZTIT0DHV3GuXlcIgYrPb KkjiFqw9TlcArTpoNGVLouwrm/YU9ldRuGgCSK7I91spn+LDhml9QVh4Ybth9YMdFA zMLEbWFXxnOBA== 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 4.14 09/66] mips: ar7: add missing iounmap() on error in ar7_gpio_init Date: Tue, 22 Dec 2020 21:21:55 -0500 Message-Id: <20201223022253.2793452-9-sashal@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201223022253.2793452-1-sashal@kernel.org> References: <20201223022253.2793452-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 4eee7e9e26ee2..3ba58f980fec2 100644 --- a/arch/mips/ar7/gpio.c +++ b/arch/mips/ar7/gpio.c @@ -332,6 +332,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