ARM: OMAP2+: Fix possible memory leak in omap_hwmod_allocate_module
authorChen Tao <chentao107@huawei.com>
Fri, 19 Jun 2020 10:42:40 +0000 (18:42 +0800)
committerTony Lindgren <tony@atomide.com>
Tue, 14 Jul 2020 15:03:05 +0000 (08:03 -0700)
commita18fb07623813aaee1a69873c785865695a32c9e
tree133816a796990779ba1878aa2c3c7387534de1e6
parenta55de412228cc5a2b4bf8d2a09849898102633e2
ARM: OMAP2+: Fix possible memory leak in omap_hwmod_allocate_module

Fix memory leak in omap_hwmod_allocate_module not freeing in
handling error path.

Fixes: 8c87970543b17("ARM: OMAP2+: Add functions to allocate module data from device tree")
Signed-off-by: Chen Tao <chentao107@huawei.com>
Reviewed-by: Paul Walmsley <paul@pwsan.com>
[tony@atomide.com: fix call iounmap for missing regs]
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/omap_hwmod.c