Re: [PATCH net] net: pse-pd: tps23881: Fix boolean evaluation for bitmask checks

From: Oleksij Rempel
Date: Tue Sep 24 2024 - 02:18:21 EST


On Mon, Sep 23, 2024 at 05:34:26PM +0200, Kory Maincent wrote:
> Fixed potential incorrect boolean evaluation when checking bitmask values.
> The existing code assigned the result of bitwise operations directly to
> boolean variables, which could lead to unexpected values.
> This has been corrected by explicitly converting the results to booleans
> using the !! operator.
>
> Fixes: 20e6d190ffe1 ("net: pse-pd: Add TI TPS23881 PSE controller driver")
> Signed-off-by: Kory Maincent <kory.maincent@xxxxxxxxxxx>

Acked-by: Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx>

Thank you!
--
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 |