Merge tag 'gpio-v3.18-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw...
[sfrench/cifs-2.6.git] / drivers / pinctrl / nomadik / pinctrl-abx500.c
index 47f49314986356eb86497d17e251dc7cbecc2957..22897282713251291c47f926b6042c3689993d6c 100644 (file)
@@ -1174,7 +1174,7 @@ static int abx500_gpio_probe(struct platform_device *pdev)
        const struct of_device_id *match;
        struct abx500_pinctrl *pct;
        unsigned int id = -1;
-       int ret, err;
+       int ret;
        int i;
 
        if (!np) {
@@ -1266,10 +1266,7 @@ static int abx500_gpio_probe(struct platform_device *pdev)
        return 0;
 
 out_rem_chip:
-       err = gpiochip_remove(&pct->chip);
-       if (err)
-               dev_info(&pdev->dev, "failed to remove gpiochip\n");
-
+       gpiochip_remove(&pct->chip);
        return ret;
 }
 
@@ -1280,15 +1277,8 @@ out_rem_chip:
 static int abx500_gpio_remove(struct platform_device *pdev)
 {
        struct abx500_pinctrl *pct = platform_get_drvdata(pdev);
-       int ret;
-
-       ret = gpiochip_remove(&pct->chip);
-       if (ret < 0) {
-               dev_err(pct->dev, "unable to remove gpiochip: %d\n",
-                       ret);
-               return ret;
-       }
 
+       gpiochip_remove(&pct->chip);
        return 0;
 }