[PATCH] clocksource/drivers/timer-cadence-ttc: fix a signedness bug in probe()
Dan Carpenter
dan.carpenter at linaro.org
Tue Jun 6 02:39:24 PDT 2023
On Tue, Jun 06, 2023 at 11:26:20AM +0200, Michal Simek wrote:
>
>
> On 6/6/23 10:15, Dan Carpenter wrote:
> > Make the "irq" variable signed so the error handling can work.
>
> urq_of_parse_and_map returns unsigned type.
>
Ugh... You're right. This is one of those return zero on error IRQ
functions.
> include/linux/of_irq.h:118:extern unsigned int irq_of_parse_and_map(struct
> device_node *node, int index);
>
> instead of this condition should be fixed to
>
> irq = irq_of_parse_and_map(timer, 1);
> if (!irq) {
> ...
>
Sure. I can resend.
regards,
dan carpenter
More information about the linux-arm-kernel
mailing list