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

Commit 9f5132ae authored by abdoulaye berthe's avatar abdoulaye berthe Committed by Linus Walleij
Browse files

gpio: remove all usage of gpio_remove retval in driver/gpio

parent 38ed0187
Loading
Loading
Loading
Loading
+3 −5
Original line number Original line Diff line number Diff line
@@ -167,13 +167,11 @@ static int gen_74x164_probe(struct spi_device *spi)
static int gen_74x164_remove(struct spi_device *spi)
static int gen_74x164_remove(struct spi_device *spi)
{
{
	struct gen_74x164_chip *chip = spi_get_drvdata(spi);
	struct gen_74x164_chip *chip = spi_get_drvdata(spi);
	int ret;


	ret = gpiochip_remove(&chip->gpio_chip);
	gpiochip_remove(&chip->gpio_chip);
	if (!ret)
	mutex_destroy(&chip->lock);
	mutex_destroy(&chip->lock);


	return ret;
	return 0;
}
}


static const struct of_device_id gen_74x164_dt_ids[] = {
static const struct of_device_id gen_74x164_dt_ids[] = {
+1 −8
Original line number Original line Diff line number Diff line
@@ -585,15 +585,8 @@ static int adnp_i2c_remove(struct i2c_client *client)
{
{
	struct adnp *adnp = i2c_get_clientdata(client);
	struct adnp *adnp = i2c_get_clientdata(client);
	struct device_node *np = client->dev.of_node;
	struct device_node *np = client->dev.of_node;
	int err;

	err = gpiochip_remove(&adnp->gpio);
	if (err < 0) {
		dev_err(&client->dev, "%s failed: %d\n", "gpiochip_remove()",
			err);
		return err;
	}


	gpiochip_remove(&adnp->gpio);
	if (of_find_property(np, "interrupt-controller", NULL))
	if (of_find_property(np, "interrupt-controller", NULL))
		adnp_irq_teardown(adnp);
		adnp_irq_teardown(adnp);


+1 −7
Original line number Original line Diff line number Diff line
@@ -167,15 +167,9 @@ static int adp5520_gpio_probe(struct platform_device *pdev)
static int adp5520_gpio_remove(struct platform_device *pdev)
static int adp5520_gpio_remove(struct platform_device *pdev)
{
{
	struct adp5520_gpio *dev;
	struct adp5520_gpio *dev;
	int ret;


	dev = platform_get_drvdata(pdev);
	dev = platform_get_drvdata(pdev);
	ret = gpiochip_remove(&dev->gpio_chip);
	gpiochip_remove(&dev->gpio_chip);
	if (ret) {
		dev_err(&pdev->dev, "%s failed, %d\n",
				"gpiochip_remove()", ret);
		return ret;
	}


	return 0;
	return 0;
}
}
+1 −5
Original line number Original line Diff line number Diff line
@@ -470,11 +470,7 @@ static int adp5588_gpio_remove(struct i2c_client *client)
	if (dev->irq_base)
	if (dev->irq_base)
		free_irq(dev->client->irq, dev);
		free_irq(dev->client->irq, dev);


	ret = gpiochip_remove(&dev->gpio_chip);
	gpiochip_remove(&dev->gpio_chip);
	if (ret) {
		dev_err(&client->dev, "gpiochip_remove failed %d\n", ret);
		return ret;
	}


	kfree(dev);
	kfree(dev);
	return 0;
	return 0;
+1 −2
Original line number Original line Diff line number Diff line
@@ -232,8 +232,7 @@ static int __init amd_gpio_init(void)


static void __exit amd_gpio_exit(void)
static void __exit amd_gpio_exit(void)
{
{
	int err = gpiochip_remove(&gp.chip);
	gpiochip_remove(&gp.chip);
	WARN_ON(err);
	ioport_unmap(gp.pm);
	ioport_unmap(gp.pm);
	release_region(gp.pmbase + PMBASE_OFFSET, PMBASE_SIZE);
	release_region(gp.pmbase + PMBASE_OFFSET, PMBASE_SIZE);
}
}
Loading