Skip to content

Commit 9f51ce0

Browse files
Yang Librgl
authored andcommitted
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 <[email protected]> Fixes: 0b39536 ("gpio: mpc8xxx: Fix IRQ check in mpc8xxx_probe") Signed-off-by: Yang Li <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
1 parent 7c1cf55 commit 9f51ce0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpio/gpio-mpc8xxx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ struct mpc8xxx_gpio_chip {
4747
unsigned offset, int value);
4848

4949
struct irq_domain *irq;
50-
unsigned int irqn;
50+
int irqn;
5151
};
5252

5353
/*

0 commit comments

Comments
 (0)