Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp259404pxx; Thu, 29 Oct 2020 01:46:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/ycFM3lViLiTvLhhPRfqBMS3YjLHsKFDeMIBo/NiQA4PE1SHBvR2mKHksLG74w4tGDpUt X-Received: by 2002:a17:906:e88:: with SMTP id p8mr2963442ejf.466.1603961197257; Thu, 29 Oct 2020 01:46:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603961197; cv=none; d=google.com; s=arc-20160816; b=YyrfidFcF9+yNCAJpDofU7FJC8YqPq9ogNAB49GBlwePWvmAnLj9mO1eFXpWaB419N DiGpBRvOUJ4qW4jFYr+S1ofRcJBbzYOq0t6hnBO3BoDoniczliFWrqpVcRjkuQs0deNO 91jVgA+jdOY11uvxpM7EvuC4k3RhHxUHfbLQ0KxCw7gStHm3x6GraEoqvLqIsauZrq4c qmH17ARzhqKYbzCyAM6L3fl8sGNZxvjyy3AouIueRFkWmUMnwHpD3oP93eYYuJS8jKWX O2ZHMrL1jK4uQ8eUFF5EbnAbfD21fCTxZF7lXFYnqMZuTGvfsRXzPWiw5Bx+ZCm4x+Jg uoDg== 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 :message-id:date:subject:cc:to:from; bh=8IYusqH7kqT4yEy2B9G5wwtyslTlUfgCn4tgkmOQxqQ=; b=WnAu5cL9jCA0t71WnBkQOW1YVUkm8HYyZ00R4Bd+kzaZLAFqDabpjmg2HFM0fFzU+W ZiMb6jo8cqUjwNOqE4wd4mPp7JqKxTAAjU/wzfU+eehEL0iVN7f4wXSLxyQhp2uWjYpR yyl/h88hhUenUq+AU6qJQ0FK/6tlxWMt/0sF64cuCTpt1jnakIskIApCbCTaC+bj/J+Z zRNxlclqeTUObs55hR/4oBJzsxhgj6K0cZqQn7YbCe+DBlun9HHLcaXCDd2P20cWiUxP ivoDlT2NcUEZkCVbRv0tvKv4XtqGOMIh10PvDq1ZsN+dYgY4mLqebcxmAQO8b+stktAO 73yA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y22si1512293edq.522.2020.10.29.01.46.15; Thu, 29 Oct 2020 01:46:37 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728543AbgJ2BEn (ORCPT + 99 others); Wed, 28 Oct 2020 21:04:43 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:6921 "EHLO szxga07-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730044AbgJ1WGH (ORCPT ); Wed, 28 Oct 2020 18:06:07 -0400 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4CLjT64z5Sz6wTG; Wed, 28 Oct 2020 17:10:02 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.487.0; Wed, 28 Oct 2020 17:09:49 +0800 From: Qinglang Miao To: Thomas Bogendoerfer CC: , , "Qinglang Miao" Subject: [PATCH] mips: ar7: add missing iounmap() on error in ar7_gpio_init Date: Wed, 28 Oct 2020 17:15:45 +0800 Message-ID: <20201028091545.136212-1-miaoqinglang@huawei.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add the missing iounmap() of gpch->regs before return from ar7_gpio_init() in the error handling case. Signed-off-by: Qinglang Miao --- 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 8b006addd..ae0e01b94 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.23.0