Skip to contentSkip to conversation

Free when ioremap fails in powerpc/platforms/52xx/mpc52xx_pci.c

PATCH New Roel Kluin 1 participant 1 message Oct 27, 2007

Subsystems (2)
lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/1 Free when ioremap fails in powerpc/platforms/52xx/mpc52xx_pci.c

Free hose when ioremap fails

---

arch/powerpc/platforms/52xx/mpc52xx_pci.c +3 -1
index 4c6c82a..50f9655 100644
@@ -395,8 +395,10 @@ mpc52xx_add_bridge(struct device_node *node)
 	hose->ops = &mpc52xx_pci_ops;
 
 	pci_regs = ioremap(rsrc.start, rsrc.end - rsrc.start + 1);
-	if (!pci_regs)
+	if (!pci_regs) {
+		pcibios_free_controller(hose);
 		return -ENOMEM;
+	}
 
 	pci_process_bridge_OF_ranges(hose, node, 1);