]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
phy: Find the right match in devm_phy_destroy()
authorThierry Reding <treding@nvidia.com>
Wed, 25 Feb 2015 15:16:29 +0000 (16:16 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Apr 2015 12:03:53 +0000 (14:03 +0200)
commit78dc9937928e17b285d66d5173aceff46fd69e0b
treec0552ed368bc64a5ec2c6f0eb6d7f7ac4005dfcb
parent75d10b6098a419dca452c86ee6b2f4117006f826
phy: Find the right match in devm_phy_destroy()

commit 2f1bce487cd0a02623cff3d877940f9a2026341c upstream.

devm_phy_create() stores the pointer to the new PHY at the address
returned by devres_alloc(). The res parameter passed to devm_phy_match()
is therefore the location where the pointer to the PHY is stored, hence
it needs to be dereferenced before comparing to the match data in order
to find the correct match.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/phy/phy-core.c