ARM: imx31: Fix IIM mapping leak in revision check

[ Upstream commit ccb4b54b8e ]

mx31_read_cpu_rev() maps the IIM registers with of_iomap() to read the
silicon revision, but returns without unmapping the MMIO mapping.

Keep the normalized revision value in a local variable and route the
return path through iounmap() after the revision register has been read.

Fixes: 3172225d45 ("ARM: imx31: Retrieve the IIM base address from devicetree")
Signed-off-by: Yuho Choi <dbgh9129@gmail.com>
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Yuho Choi 2026-05-25 00:01:58 -04:00 • committed by Greg Kroah-Hartman
commit d2efdd45ee