# Re: \[PATCH net-next\] net: phy: icplus: Call phy\_restore\_page() when phy\_select\_page() fails

- From: Michael Walle \<hidden\>
- Date: 2021-02-17 07:53:08 
- List: netdev
- Page: https://ratatoskr.run/netdev/2021/02/11196988
- Thread: https://ratatoskr.run/netdev/2021/02/11196982/t.md

```text
Am 2021-02-17 07:17, schrieb Dan Carpenter:
> Smatch warns that there is a locking issue in this function:
>
> drivers/net/phy/icplus.c:273 ip101a_g_config_intr_pin()
> warn: inconsistent returns '&phydev->mdio.bus->mdio_lock'.
>   Locked on  : 242
>   Unlocked on: 273
>
> It turns out that the comments in phy_select_page() say we have to call
> phy_restore_page() even if the call to phy_select_page() fails.
>
> Fixes: f9bc51e6cce2 ("net: phy: icplus: fix paged register access")
> Signed-off-by: Dan Carpenter <redacted>

Reviewed-by: Michael Walle <redacted>

-michael
```
