gpio: extraxfs: fix returnvar.cocci warnings
authorJulia Lawall <julia.lawall@lip6.fr>
Thu, 13 Aug 2015 15:41:16 +0000 (17:41 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 25 Aug 2015 14:27:33 +0000 (16:27 +0200)
Remove unneeded variable used to store return value.

Generated by: scripts/coccinelle/misc/returnvar.cocci

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-etraxfs.c

index 2ffcd9fdd1f2f7d3df917aa0324a07e3f23b17c8..ca33bda8ec555a37ed7cd729133383cb9dd71e12 100644 (file)
@@ -292,7 +292,6 @@ static int etraxfs_gpio_irq_request_resources(struct irq_data *d)
        struct etraxfs_gpio_chip *chip = irq_data_get_irq_chip_data(d);
        struct etraxfs_gpio_block *block = chip->block;
        unsigned int grpirq = etraxfs_gpio_to_group_irq(d->hwirq);
-       int ret = -EBUSY;
 
        spin_lock(&block->lock);
        if (block->group[grpirq])
@@ -314,7 +313,7 @@ static int etraxfs_gpio_irq_request_resources(struct irq_data *d)
 
 out:
        spin_unlock(&block->lock);
-       return ret;
+       return -EBUSY;
 }
 
 static void etraxfs_gpio_irq_release_resources(struct irq_data *d)