From: Yang Li Date: Wed, 19 Jan 2022 01:04:32 +0000 (+0800) Subject: gpio: mpc8xxx: Fix an ignored error return from platform_get_irq() X-Git-Tag: baikal/aarch64/sdk6.1~4828^2 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=78bdc24cf75d067354ed636062d4dbce3b8e7a60;p=kernel.git gpio: mpc8xxx: Fix an ignored error return from platform_get_irq() The return from the call to platform_get_irq() is int, it can be a negative error code, however this is being assigned to an unsigned int variable 'irqn', so making 'irqn' an int. Eliminate the following coccicheck warning: ./drivers/gpio/gpio-mpc8xxx.c:391:5-21: WARNING: Unsigned expression compared with zero: mpc8xxx_gc -> irqn < 0 Reported-by: Abaci Robot Fixes: 2b10b8665107 ("gpio: mpc8xxx: Fix IRQ check in mpc8xxx_probe") Signed-off-by: Yang Li Signed-off-by: Bartosz Golaszewski --- diff --git a/drivers/gpio/gpio-mpc8xxx.c b/drivers/gpio/gpio-mpc8xxx.c index 01634c8d27b38..a964e25ea6206 100644 --- a/drivers/gpio/gpio-mpc8xxx.c +++ b/drivers/gpio/gpio-mpc8xxx.c @@ -47,7 +47,7 @@ struct mpc8xxx_gpio_chip { unsigned offset, int value); struct irq_domain *irq; - unsigned int irqn; + int irqn; }; /*