aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/pata_pcmcia.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/pata_pcmcia.c')
-rw-r--r--drivers/ata/pata_pcmcia.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/ata/pata_pcmcia.c b/drivers/ata/pata_pcmcia.c
index dc99e26f8e5b..5f94e214e17d 100644
--- a/drivers/ata/pata_pcmcia.c
+++ b/drivers/ata/pata_pcmcia.c
@@ -177,9 +177,6 @@ static struct ata_port_operations pcmcia_8bit_port_ops = {
177 .drain_fifo = pcmcia_8bit_drain_fifo, 177 .drain_fifo = pcmcia_8bit_drain_fifo,
178}; 178};
179 179
180#define CS_CHECK(fn, ret) \
181do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0)
182
183 180
184struct pcmcia_config_check { 181struct pcmcia_config_check {
185 unsigned long ctl_base; 182 unsigned long ctl_base;
@@ -252,7 +249,7 @@ static int pcmcia_init_one(struct pcmcia_device *pdev)
252 struct ata_port *ap; 249 struct ata_port *ap;
253 struct ata_pcmcia_info *info; 250 struct ata_pcmcia_info *info;
254 struct pcmcia_config_check *stk = NULL; 251 struct pcmcia_config_check *stk = NULL;
255 int last_ret = 0, last_fn = 0, is_kme = 0, ret = -ENOMEM, p; 252 int is_kme = 0, ret = -ENOMEM, p;
256 unsigned long io_base, ctl_base; 253 unsigned long io_base, ctl_base;
257 void __iomem *io_addr, *ctl_addr; 254 void __iomem *io_addr, *ctl_addr;
258 int n_ports = 1; 255 int n_ports = 1;
@@ -296,8 +293,13 @@ static int pcmcia_init_one(struct pcmcia_device *pdev)
296 } 293 }
297 io_base = pdev->io.BasePort1; 294 io_base = pdev->io.BasePort1;
298 ctl_base = stk->ctl_base; 295 ctl_base = stk->ctl_base;
299 CS_CHECK(RequestIRQ, pcmcia_request_irq(pdev, &pdev->irq)); 296 ret = pcmcia_request_irq(pdev, &pdev->irq);
300 CS_CHECK(RequestConfiguration, pcmcia_request_configuration(pdev, &pdev->conf)); 297 if (ret)
298 goto failed;
299
300 ret = pcmcia_request_configuration(pdev, &pdev->conf);
301 if (ret)
302 goto failed;
301 303
302 /* iomap */ 304 /* iomap */
303 ret = -ENOMEM; 305 ret = -ENOMEM;
@@ -351,8 +353,6 @@ static int pcmcia_init_one(struct pcmcia_device *pdev)
351 kfree(stk); 353 kfree(stk);
352 return 0; 354 return 0;
353 355
354cs_failed:
355 cs_error(pdev, last_fn, last_ret);
356failed: 356failed:
357 kfree(stk); 357 kfree(stk);
358 info->ndev = 0; 358 info->ndev = 0;