summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2020-02-12 10:02:00 +0100
committerGeert Uytterhoeven <geert+renesas@glider.be>2020-02-21 13:57:44 +0100
commit6793baa31d684f2cace0e2ee4af4bdbc993dbed8 (patch)
tree7e82bbbef6a0b04a09f017cf58fb822021db5fac /drivers/pinctrl
parent92c44680c5c6f1342288f6626da4008d416d8e40 (diff)
downloadlinux-6793baa31d684f2cace0e2ee4af4bdbc993dbed8.tar.gz
linux-6793baa31d684f2cace0e2ee4af4bdbc993dbed8.tar.bz2
linux-6793baa31d684f2cace0e2ee4af4bdbc993dbed8.zip
pinctrl: sh-pfc: gpio: Return early in gpio_pin_to_irq()
As of commit 4adeabd042422cee ("pinctrl: sh-pfc: Remove hardcoded IRQ numbers"), only a single operation needs to be performed after finding the wanted pin. Hence decrease the needed attention span of the casual reader by replacing the goto by a direct return. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Link: https://lore.kernel.org/r/20200212090200.11106-1-geert+renesas@glider.be
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r--drivers/pinctrl/sh-pfc/gpio.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/pinctrl/sh-pfc/gpio.c b/drivers/pinctrl/sh-pfc/gpio.c
index 8213e118aa40..9c6e931ae766 100644
--- a/drivers/pinctrl/sh-pfc/gpio.c
+++ b/drivers/pinctrl/sh-pfc/gpio.c
@@ -205,14 +205,11 @@ static int gpio_pin_to_irq(struct gpio_chip *gc, unsigned offset)
for (k = 0; gpios[k] >= 0; k++) {
if (gpios[k] == offset)
- goto found;
+ return pfc->irqs[i];
}
}
return 0;
-
-found:
- return pfc->irqs[i];
}
static int gpio_pin_setup(struct sh_pfc_chip *chip)