Re: [PATCH net] net: pse-pd: fix sign on -ENOENT check in of_load_pse_pis()
From: Oleksij Rempel
Date: Tue May 19 2026 - 11:15:54 EST
On Fri, May 15, 2026 at 02:31:03PM +0000, Jonas Jelonek wrote:
> of_count_phandle_with_args() returns the count on success and a negative
> errno on failure, including -ENOENT when the "pairsets" property is
> absent. The existing comparison in of_load_pse_pis() checks against
> ENOENT (positive 2) instead of -ENOENT, so the branch is taken for any
> error return: legitimate DTs that omit "pairsets" trigger a spurious
> "wrong number of pairsets" error and probe fails with -EINVAL.
>
> Compare against -ENOENT so a missing "pairsets" property is correctly
> treated as "this PI has no pairsets, continue".
>
> Fixes: 9be9567a7c59 ("net: pse-pd: Add support for PSE PIs")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Jonas Jelonek <jelonek.jonas@xxxxxxxxx>
Acked-by: Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx>
Thank you!
Best Regards,
Oleksij
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |