Re: [PATCH] clocksource/drivers/timer-cadence-ttc: fix a signedness bug in probe()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux