powerpc: fix memory leaks in QE library
authorTimur Tabi <timur@freescale.com>
Wed, 20 Aug 2008 15:29:09 +0000 (10:29 -0500)
committerKumar Gala <galak@kernel.crashing.org>
Thu, 21 Aug 2008 04:58:12 +0000 (23:58 -0500)
commit61a4e9e91dd3916ef91aa4899b7271bba0248677
treef5efdda2417abec232276f011c4fb422959994e6
parentd27a736c7a62c3451e389aa8e0dfc64dab119b9b
powerpc: fix memory leaks in QE library

Fix two memory leaks in the Freescale QE library: add a missing kfree() in
ucc_fast_init() and ucc_slow_init() if the ioremap() fails, and update
ucc_fast_free() and ucc_slow_free() to call iounmap() if necessary.

Based on a patch from Tony Breeds <tony@bakeyournoodle.com>.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
arch/powerpc/sysdev/qe_lib/ucc_fast.c
arch/powerpc/sysdev/qe_lib/ucc_slow.c