Bladeren bron

[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 <julia@diku.dk>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Julia Lawall 14 jaren geleden
bovenliggende
commit
ddad53ee8a
1 gewijzigde bestanden met toevoegingen van 1 en 1 verwijderingen
  1. 1 1
      arch/ia64/kernel/cyclone.c

+ 1 - 1
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);