]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: marvell: Fix double free of hwmon device
authorAndrew Lunn <andrew@lunn.ch>
Thu, 9 Mar 2017 19:53:31 +0000 (20:53 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 10 Mar 2017 06:41:03 +0000 (22:41 -0800)
commit65074430851684e0a6ca8fe8b060e45fe061b68b
tree5184588169aac5e98fdb40096d79611e2295f7de
parent6b56906c326ef9ff036866a40b65fd07db79b8aa
net: phy: marvell: Fix double free of hwmon device

The hwmon temperature sensor devices is registered using a devm_hwmon
API call.  The marvell_release() would then manually free the device,
not using a devm_hmon API, resulting in the device being removed
twice, leading to a crash in kernfs_find_ns() during the second
removal.

Remove the manual removal, which makes marvell_release() empty, so
remove it as well.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Fixes: d117284ff82c ("phy: marvell: Add support for temperature sensor")
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/marvell.c