aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/pcmcia/m8xx_pcmcia.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/pcmcia/m8xx_pcmcia.c b/drivers/pcmcia/m8xx_pcmcia.c
index 4ea426a25909..ac70d2cb7dd4 100644
--- a/drivers/pcmcia/m8xx_pcmcia.c
+++ b/drivers/pcmcia/m8xx_pcmcia.c
@@ -1174,8 +1174,10 @@ static int __init m8xx_probe(struct of_device *ofdev,
1174 1174
1175 pcmcia_schlvl = irq_of_parse_and_map(np, 0); 1175 pcmcia_schlvl = irq_of_parse_and_map(np, 0);
1176 hwirq = irq_map[pcmcia_schlvl].hwirq; 1176 hwirq = irq_map[pcmcia_schlvl].hwirq;
1177 if (pcmcia_schlvl < 0) 1177 if (pcmcia_schlvl < 0) {
1178 iounmap(pcmcia);
1178 return -EINVAL; 1179 return -EINVAL;
1180 }
1179 1181
1180 m8xx_pgcrx[0] = &pcmcia->pcmc_pgcra; 1182 m8xx_pgcrx[0] = &pcmcia->pcmc_pgcra;
1181 m8xx_pgcrx[1] = &pcmcia->pcmc_pgcrb; 1183 m8xx_pgcrx[1] = &pcmcia->pcmc_pgcrb;
@@ -1189,6 +1191,7 @@ static int __init m8xx_probe(struct of_device *ofdev,
1189 driver_name, socket)) { 1191 driver_name, socket)) {
1190 pcmcia_error("Cannot allocate IRQ %u for SCHLVL!\n", 1192 pcmcia_error("Cannot allocate IRQ %u for SCHLVL!\n",
1191 pcmcia_schlvl); 1193 pcmcia_schlvl);
1194 iounmap(pcmcia);
1192 return -1; 1195 return -1;
1193 } 1196 }
1194 1197
@@ -1284,6 +1287,7 @@ static int m8xx_remove(struct of_device *ofdev)
1284 } 1287 }
1285 for (i = 0; i < PCMCIA_SOCKETS_NO; i++) 1288 for (i = 0; i < PCMCIA_SOCKETS_NO; i++)
1286 pcmcia_unregister_socket(&socket[i].socket); 1289 pcmcia_unregister_socket(&socket[i].socket);
1290 iounmap(pcmcia);
1287 1291
1288 free_irq(pcmcia_schlvl, NULL); 1292 free_irq(pcmcia_schlvl, NULL);
1289 1293