Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit da26d5d8 authored by Linus Walleij's avatar Linus Walleij
Browse files

gpio: remove remaining users of gpiochip_remove() retval



Some drivers accidentally still use the return value from
gpiochip_remove(). Get rid of them so we can simplify this function
and get rid of the return value.

Cc: Abdoulaye Berthe <berthe.ab@gmail.com>
Acked-by: default avatarAlexandre Courbot <acourbot@nvidia.com>
Acked-by: default avatarJavier Martinez Canillas <javier@dowhile0.org>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 2fcea6ce
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -346,7 +346,7 @@ static int crystalcove_gpio_probe(struct platform_device *pdev)
	return 0;

out_remove_gpio:
	WARN_ON(gpiochip_remove(&cg->chip));
	gpiochip_remove(&cg->chip);
	return retval;
}

@@ -354,14 +354,11 @@ static int crystalcove_gpio_remove(struct platform_device *pdev)
{
	struct crystalcove_gpio *cg = platform_get_drvdata(pdev);
	int irq = platform_get_irq(pdev, 0);
	int err;

	err = gpiochip_remove(&cg->chip);

	gpiochip_remove(&cg->chip);
	if (irq >= 0)
		free_irq(irq, cg);

	return err;
	return 0;
}

static struct platform_driver crystalcove_gpio_driver = {
+1 −1
Original line number Diff line number Diff line
@@ -1143,7 +1143,7 @@ static int omap_gpio_chip_init(struct gpio_bank *bank)

	if (ret) {
		dev_err(bank->dev, "Couldn't add irqchip to gpiochip %d\n", ret);
		ret = gpiochip_remove(&bank->chip);
		gpiochip_remove(&bank->chip);
		return -ENODEV;
	}

+2 −5
Original line number Diff line number Diff line
@@ -216,12 +216,9 @@ static int xgene_gpio_probe(struct platform_device *pdev)
static int xgene_gpio_remove(struct platform_device *pdev)
{
	struct xgene_gpio *gpio = platform_get_drvdata(pdev);
	int ret = 0;

	ret = gpiochip_remove(&gpio->chip);
	if (ret)
		dev_err(&pdev->dev, "unable to remove gpio_chip.\n");
	return ret;
	gpiochip_remove(&gpio->chip);
	return 0;
}

#ifdef CONFIG_OF
+1 −7
Original line number Diff line number Diff line
@@ -686,16 +686,10 @@ static int zynq_gpio_probe(struct platform_device *pdev)
 */
static int zynq_gpio_remove(struct platform_device *pdev)
{
	int ret;
	struct zynq_gpio *gpio = platform_get_drvdata(pdev);

	pm_runtime_get_sync(&pdev->dev);

	ret = gpiochip_remove(&gpio->chip);
	if (ret) {
		dev_err(&pdev->dev, "Failed to remove gpio chip\n");
		return ret;
	}
	gpiochip_remove(&gpio->chip);
	clk_disable_unprepare(gpio->clk);
	device_set_wakeup_capable(&pdev->dev, 0);
	return 0;