struct abx500_gpio_platform_data *pdata;
struct abx500_pinctrl *pct;
const struct platform_device_id *platid = platform_get_device_id(pdev);
- int ret;
+ int ret, err;
int i;
pdata = abx500_pdata->gpio;
if (!pct->pctldev) {
dev_err(&pdev->dev,
"could not register abx500 pinctrl driver\n");
+ ret = -EINVAL;
goto out_rem_chip;
}
dev_info(&pdev->dev, "registered pin controller\n");
dev_name(&pdev->dev),
p->offset - 1, p->offset, p->npins);
if (ret < 0)
- return ret;
+ goto out_rem_chip;
}
platform_set_drvdata(pdev, pct);
return 0;
out_rem_chip:
- ret = gpiochip_remove(&pct->chip);
- if (ret)
+ err = gpiochip_remove(&pct->chip);
+ if (err)
dev_info(&pdev->dev, "failed to remove gpiochip\n");
out_rem_irq:
abx500_gpio_irq_remove(pct);