linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mips: cm: add missing iounmap() on error in mips_cm_probe()
@ 2020-10-28  9:15 Qinglang Miao
  2020-11-06 10:49 ` Thomas Bogendoerfer
  0 siblings, 1 reply; 2+ messages in thread
From: Qinglang Miao @ 2020-10-28  9:15 UTC (permalink / raw)
  To: Thomas Bogendoerfer; +Cc: linux-mips, linux-kernel, Qinglang Miao

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 <miaoqinglang@huawei.com>
---
 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mips: cm: add missing iounmap() on error in mips_cm_probe()
  2020-10-28  9:15 [PATCH] mips: cm: add missing iounmap() on error in mips_cm_probe() Qinglang Miao
@ 2020-11-06 10:49 ` Thomas Bogendoerfer
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Bogendoerfer @ 2020-11-06 10:49 UTC (permalink / raw)
  To: Qinglang Miao; +Cc: linux-mips, linux-kernel

On Wed, Oct 28, 2020 at 05:15:46PM +0800, Qinglang Miao wrote:
> 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 <miaoqinglang@huawei.com>
> ---
>  arch/mips/kernel/mips-cm.c | 1 +
>  1 file changed, 1 insertion(+)

applied to mips-next.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-11-06 10:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-28  9:15 [PATCH] mips: cm: add missing iounmap() on error in mips_cm_probe() Qinglang Miao
2020-11-06 10:49 ` Thomas Bogendoerfer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).