]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ARM: imx31: Fix IIM mapping leak in revision check
authorYuho Choi <dbgh9129@gmail.com>
Mon, 25 May 2026 04:01:58 +0000 (00:01 -0400)
committerFrank Li <Frank.Li@nxp.com>
Mon, 1 Jun 2026 19:58:13 +0000 (15:58 -0400)
commitccb4b54b8ecf1ebafef96d538cd6c5c8455bb390
tree7bbabbbec2e73852c859a6d3dfc1bc4f6819ef68
parent36d46348eb5fc4bc505cd2290ddd70c25fbe6bb3
ARM: imx31: Fix IIM mapping leak in revision check

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: 3172225d45bd ("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>
arch/arm/mach-imx/cpu-imx31.c