Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp258755pxx; Thu, 29 Oct 2020 01:45:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxaAxZq0M2wf2gW6URMJ9o6k4G0xB4uQZl7OoYjWnYLwmL+d/3bDLuG027z6FfzBcdus7JR X-Received: by 2002:a50:ed90:: with SMTP id h16mr456514edr.255.1603961107738; Thu, 29 Oct 2020 01:45:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603961107; cv=none; d=google.com; s=arc-20160816; b=nlLlLg/vEdeUhr9wost8ck76OYsaUL56oP/ClhSZgSnZ8Iiji3uhTA5jwMfEmJehxP t+MF88trRRRjoc8nizp4OqIDpbyaeTZTToFjfSo7ywu+y8Qozl+gnOHrkHXQvpPnslHG kQK8d29yd00QCnyIq0Y+vjem4WqMWUDNfP+xGEKElCeAB5PeE6Qb1akwWDwOPri2+dUn 44OOwkndKAKmd8fMI3+W1WB5r3/Kqdj5FoURmqmnF/UobnD36G99fjX08E+iKZNcY/VR TkOApIo3Tt2QQ8X26+N4gtbY6RrGuF40BX0mPWzGR0z5yzD4VCCOkpTYBARwMQOHmAUO iUVg== 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=4/Mkais6tB4ng3gnQXueXTQMFvQMjt3ydJDbU4KeKD8=; b=Y6U8dJShIEi+gMO1MTinIFiPCJopu3gSdUvprcQA1D7bKb/H7Q2zKMhlSeepm4zk2D p2EHNIR4ZkFYu8LpNMPti2LhTcBFMLjpON+WkxfI3pjAm/G9/jpQvx83wcc9ENRLveuZ S/ZSM4teXTmbcCMwKgU3jcmfiMtTsC/wzdgKQVU0aDWmqJCznhUrIHSlZXaXB6o9yQ2h oZUr2N7sFmljD6vsHWWdyIehdYK0BL3Op0Q3DNq+TVVAcHXzDdBq/2haib0P/uzbredk XD2hGcCl6J+IUpBZUFHmzVZuKWcL98EHS5NXscd7acZd1sWm+GUbvD+Xd5w9ei/GS6/T UEGg== 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 hh9si1469971ejb.38.2020.10.29.01.44.45; Thu, 29 Oct 2020 01:45:07 -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 S1731485AbgJ2BFZ (ORCPT + 99 others); Wed, 28 Oct 2020 21:05:25 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:6980 "EHLO szxga06-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730020AbgJ1WFo (ORCPT ); Wed, 28 Oct 2020 18:05:44 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4CLjT50MgJzhcZy; Wed, 28 Oct 2020 17:10:01 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.487.0; Wed, 28 Oct 2020 17:09:50 +0800 From: Qinglang Miao To: Thomas Bogendoerfer CC: , , "Qinglang Miao" Subject: [PATCH] mips: cm: add missing iounmap() on error in mips_cm_probe() Date: Wed, 28 Oct 2020 17:15:46 +0800 Message-ID: <20201028091546.136258-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 iounmap(mips_gcr_base) before return from mips_cm_probe() in the error handling case. Signed-off-by: Qinglang Miao --- arch/mips/kernel/mips-cm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/mips/kernel/mips-cm.c b/arch/mips/kernel/mips-cm.c index f60af512c..90f1c3df1 100644 --- a/arch/mips/kernel/mips-cm.c +++ b/arch/mips/kernel/mips-cm.c @@ -266,6 +266,7 @@ int mips_cm_probe(void) if ((base_reg & CM_GCR_BASE_GCRBASE) != addr) { pr_err("GCRs appear to have been moved (expected them at 0x%08lx)!\n", (unsigned long)addr); + iounmap(mips_gcr_base); mips_gcr_base = NULL; return -ENODEV; } -- 2.23.0