|
@@ -1174,8 +1174,10 @@ static int __init m8xx_probe(struct of_device *ofdev,
|
|
|
|
|
|
pcmcia_schlvl = irq_of_parse_and_map(np, 0);
|
|
pcmcia_schlvl = irq_of_parse_and_map(np, 0);
|
|
hwirq = irq_map[pcmcia_schlvl].hwirq;
|
|
hwirq = irq_map[pcmcia_schlvl].hwirq;
|
|
- if (pcmcia_schlvl < 0)
|
|
|
|
|
|
+ if (pcmcia_schlvl < 0) {
|
|
|
|
+ iounmap(pcmcia);
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
|
|
+ }
|
|
|
|
|
|
m8xx_pgcrx[0] = &pcmcia->pcmc_pgcra;
|
|
m8xx_pgcrx[0] = &pcmcia->pcmc_pgcra;
|
|
m8xx_pgcrx[1] = &pcmcia->pcmc_pgcrb;
|
|
m8xx_pgcrx[1] = &pcmcia->pcmc_pgcrb;
|
|
@@ -1189,6 +1191,7 @@ static int __init m8xx_probe(struct of_device *ofdev,
|
|
driver_name, socket)) {
|
|
driver_name, socket)) {
|
|
pcmcia_error("Cannot allocate IRQ %u for SCHLVL!\n",
|
|
pcmcia_error("Cannot allocate IRQ %u for SCHLVL!\n",
|
|
pcmcia_schlvl);
|
|
pcmcia_schlvl);
|
|
|
|
+ iounmap(pcmcia);
|
|
return -1;
|
|
return -1;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1284,6 +1287,7 @@ static int m8xx_remove(struct of_device *ofdev)
|
|
}
|
|
}
|
|
for (i = 0; i < PCMCIA_SOCKETS_NO; i++)
|
|
for (i = 0; i < PCMCIA_SOCKETS_NO; i++)
|
|
pcmcia_unregister_socket(&socket[i].socket);
|
|
pcmcia_unregister_socket(&socket[i].socket);
|
|
|
|
+ iounmap(pcmcia);
|
|
|
|
|
|
free_irq(pcmcia_schlvl, NULL);
|
|
free_irq(pcmcia_schlvl, NULL);
|
|
|
|
|