gpio: max77620: Don't shadow error code of platform_get_irq()
authorDmitry Osipenko <digetx@gmail.com>
Thu, 9 Jul 2020 17:12:01 +0000 (20:12 +0300)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 16 Jul 2020 08:50:40 +0000 (10:50 +0200)
commitc607e5e2e4f4dc6e91da6fd81280f0474fdb6cd4
tree53bd3877a82cc246d2b690cd42c0d27cfd14ee00
parent78934d885eb237910fc9194e0eeeb96ca54b24ae
gpio: max77620: Don't shadow error code of platform_get_irq()

The platform_get_irq() returns a positive interrupt number on success and
negative error code on failure (zero shouldn't ever happen in practice, it
would produce a noisy warning). Hence let's return the error code directly
instead of overriding it with -ENODEV.

Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
Link: https://lore.kernel.org/r/20200709171203.12950-5-digetx@gmail.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-max77620.c