power: regulator: rzg2l-usbphy: Add parenthesis to return expression

In order to get the expected result from
rzg2l_usbphy_regulator_get_enable the return expression needs
parenthesis so that the binary and is performed before the double
logical not.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>
This commit is contained in:
Andrew Goodbody 2025-08-07 17:35:21 +01:00 committed by Tom Rini
parent 96312ed796
commit cdc0e32e9c

View File

@ -27,7 +27,7 @@ static int rzg2l_usbphy_regulator_get_enable(struct udevice *dev)
{ {
struct rzg2l_usbphy_ctrl_priv *priv = dev_get_priv(dev->parent); struct rzg2l_usbphy_ctrl_priv *priv = dev_get_priv(dev->parent);
return !!readl(priv->regs + VBENCTL) & VBENCTL_VBUS_SEL; return !!(readl(priv->regs + VBENCTL) & VBENCTL_VBUS_SEL);
} }
static const struct dm_regulator_ops rzg2l_usbphy_regulator_ops = { static const struct dm_regulator_ops rzg2l_usbphy_regulator_ops = {