diff options
| author | Andrew Goodbody <[email protected]> | 2025-08-07 17:35:21 +0100 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2025-08-29 16:45:19 -0600 |
| commit | cdc0e32e9c56fc3d14007d4c93394e8bcc8daa08 (patch) | |
| tree | 964021436331704197fc1c35d96b5902d507a390 /drivers | |
| parent | 96312ed79630838b09368c8c07ec164fd40a025c (diff) | |
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 <[email protected]>
Reviewed-by: Frieder Schrempf <[email protected]>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/power/regulator/rzg2l-usbphy-regulator.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/power/regulator/rzg2l-usbphy-regulator.c b/drivers/power/regulator/rzg2l-usbphy-regulator.c index 451f04c140e..0354555d0b5 100644 --- a/drivers/power/regulator/rzg2l-usbphy-regulator.c +++ b/drivers/power/regulator/rzg2l-usbphy-regulator.c @@ -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); - 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 = { |
