From: Geert Uytterhoeven Date: Wed, 12 Feb 2020 09:02:00 +0000 (+0100) Subject: pinctrl: sh-pfc: gpio: Return early in gpio_pin_to_irq() X-Git-Tag: v5.7-rc1~117^2~21^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6793baa31d684f2cace0e2ee4af4bdbc993dbed8;p=thirdparty%2Fkernel%2Flinux.git 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 Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/20200212090200.11106-1-geert+renesas@glider.be --- diff --git a/drivers/pinctrl/sh-pfc/gpio.c b/drivers/pinctrl/sh-pfc/gpio.c index 8213e118aa408..9c6e931ae766e 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)