]> git.karo-electronics.de Git - karo-tx-linux.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)
commit296739839fa2851e6badc77dcfc45050094cb102
tree5184588169aac5e98fdb40096d79611e2295f7de
parentb3b8812e66511b7da3c4fed140da5f751c38cd7a
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: 0b04680fdae4 ("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