aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-langwell.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpio/gpio-langwell.c')
-rw-r--r--drivers/gpio/gpio-langwell.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpio/gpio-langwell.c b/drivers/gpio/gpio-langwell.c
index a1c8754f52cf..202a99207b7d 100644
--- a/drivers/gpio/gpio-langwell.c
+++ b/drivers/gpio/gpio-langwell.c
@@ -339,7 +339,7 @@ static int __devinit lnw_gpio_probe(struct pci_dev *pdev,
339 resource_size_t start, len; 339 resource_size_t start, len;
340 struct lnw_gpio *lnw; 340 struct lnw_gpio *lnw;
341 u32 gpio_base; 341 u32 gpio_base;
342 int retval = 0; 342 int retval;
343 int ngpio = id->driver_data; 343 int ngpio = id->driver_data;
344 344
345 retval = pci_enable_device(pdev); 345 retval = pci_enable_device(pdev);
@@ -357,6 +357,7 @@ static int __devinit lnw_gpio_probe(struct pci_dev *pdev,
357 base = ioremap_nocache(start, len); 357 base = ioremap_nocache(start, len);
358 if (!base) { 358 if (!base) {
359 dev_err(&pdev->dev, "error mapping bar1\n"); 359 dev_err(&pdev->dev, "error mapping bar1\n");
360 retval = -EFAULT;
360 goto err3; 361 goto err3;
361 } 362 }
362 gpio_base = *((u32 *)base + 1); 363 gpio_base = *((u32 *)base + 1);
@@ -381,8 +382,10 @@ static int __devinit lnw_gpio_probe(struct pci_dev *pdev,
381 382
382 lnw->domain = irq_domain_add_linear(pdev->dev.of_node, ngpio, 383 lnw->domain = irq_domain_add_linear(pdev->dev.of_node, ngpio,
383 &lnw_gpio_irq_ops, lnw); 384 &lnw_gpio_irq_ops, lnw);
384 if (!lnw->domain) 385 if (!lnw->domain) {
386 retval = -ENOMEM;
385 goto err3; 387 goto err3;
388 }
386 389
387 lnw->reg_base = base; 390 lnw->reg_base = base;
388 lnw->chip.label = dev_name(&pdev->dev); 391 lnw->chip.label = dev_name(&pdev->dev);