Thread (4 messages) flat view 4 messages, 2 authors, 2021-11-26

Re: [PATCH] ptp: ixp46x: Fix error handling in ptp_ixp_probe()

From: Linus Walleij <hidden>
Date: 2021-11-26 01:28:37
Also in: lkml

On Fri, Nov 26, 2021 at 2:10 AM Tang Bin [off-list ref] wrote:
In the function ptp_ixp_probe(), when get irq failed
after executing platform_get_irq(), the negative value
returned will not be detected here. So fix error handling
in this place.

Fixes: 9055a2f591629 ("ixp4xx_eth: make ptp support a platform driver")
Signed-off-by: Tang Bin <redacted>
OK the intention is right but:
-           !ixp_clock.master_irq || !ixp_clock.slave_irq)
+           (ixp_clock.master_irq < 0) || (ixp_clock.slave_irq < 0))
Keep disallowing 0. Because that is not a valid IRQ.

... <= 0 ...

Yours,
Linus Walleij
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help