Re: [PATCH net-next] net: phy: icplus: Call phy_restore_page() when phy_select_page() fails

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 2021-02-17 11:04, schrieb Russell King - ARM Linux admin:
On Wed, Feb 17, 2021 at 09:17:59AM +0300, Dan Carpenter wrote:
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.

It seems it's a total waste of time documenting functions...

You once said

"""
Kernel development is fundamentally a difficult, frustrating and
depressing activity.
"""

But really this comment doesn't make it much better. Yes I've made
a mistake although I _read_ the function documentation. So shame on
me.

-michael




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux