From: Lad Prabhakar prabhakar.mahadev-lad.rj@bp.renesas.com
Ensure the reset status check explicitly evaluates whether all bits in `port_mask` are set. Replace the double negation (`!!`) with an equality check to prevent incorrect interpretation of partial bit matches as an asserted reset.
Fixes: bee08559701f ("reset: renesas: Add RZ/G2L usbphy control driver") Cc: stable@vger.kernel.org Signed-off-by: Lad Prabhakar prabhakar.mahadev-lad.rj@bp.renesas.com --- drivers/reset/reset-rzg2l-usbphy-ctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/reset/reset-rzg2l-usbphy-ctrl.c b/drivers/reset/reset-rzg2l-usbphy-ctrl.c index 8a7f167e405e..6451f621e862 100644 --- a/drivers/reset/reset-rzg2l-usbphy-ctrl.c +++ b/drivers/reset/reset-rzg2l-usbphy-ctrl.c @@ -88,7 +88,7 @@ static int rzg2l_usbphy_ctrl_status(struct reset_controller_dev *rcdev,
port_mask = id ? PHY_RESET_PORT2 : PHY_RESET_PORT1;
- return !!(readl(priv->base + RESET) & port_mask); + return (readl(priv->base + RESET) & port_mask) == port_mask; }
static const struct of_device_id rzg2l_usbphy_ctrl_match_table[] = {