phy: Find the right match in devm_phy_destroy()

[ Upstream commit 2f1bce487c ]

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.

Cc: <stable@vger.kernel.org> # v3.13+
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
This commit is contained in:
Thierry Reding 2015-02-25 16:16:29 +01:00 • committed by Sasha Levin
commit 59bbaa453d