mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-04 17:44:14 +08:00
pinctrl: sh-pfc: gpio: Return early in gpio_pin_to_irq()
As of commit 4adeabd042
("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
This commit is contained in:
parent
92c44680c5
commit
6793baa31d
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user