From: Julia Lawall Date: Fri, 27 Aug 2010 21:01:30 +0000 (+0200) Subject: [IA64] Fix missing iounmap in error path in cyclone.c X-Git-Tag: v2.6.37-rc1~188^2^3~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ddad53ee8a85649e78f6a3eb8a4af4a7a7c577cb;p=thirdparty%2Fkernel%2Flinux.git [IA64] Fix missing iounmap in error path in cyclone.c By moving the iounmap up above the test, it takes place whether the test succeeds or fails. Signed-off-by: Julia Lawall Signed-off-by: Tony Luck --- diff --git a/arch/ia64/kernel/cyclone.c b/arch/ia64/kernel/cyclone.c index 71e35864d2e25..d52f1f78eff2a 100644 --- a/arch/ia64/kernel/cyclone.c +++ b/arch/ia64/kernel/cyclone.c @@ -59,13 +59,13 @@ int __init init_cyclone_clock(void) return -ENODEV; } base = readq(reg); + iounmap(reg); if(!base){ printk(KERN_ERR "Summit chipset: Could not find valid CBAR" " value.\n"); use_cyclone = 0; return -ENODEV; } - iounmap(reg); /* setup PMCC */ offset = (base + CYCLONE_PMCC_OFFSET);