diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2014-07-16 21:57:38 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2014-07-16 21:57:38 +0200 |
commit | afdb094380889222583df9ef803587f6b8a82c8d (patch) | |
tree | 4a03c516568e5c8b994a5739f3d34f4552c78898 /drivers/phy/phy-core.c | |
parent | be11e6d86081aa6328eaa4fe6dd14ccf39a023c8 (diff) | |
parent | 1795cd9b3a91d4b5473c97f491d63892442212ab (diff) | |
download | linux-afdb094380889222583df9ef803587f6b8a82c8d.tar.gz linux-afdb094380889222583df9ef803587f6b8a82c8d.tar.bz2 linux-afdb094380889222583df9ef803587f6b8a82c8d.zip |
Merge tag 'v3.16-rc5' into timers/core
Reason: Bring in upstream modifications, so the pending changes which
depend on them can be queued.
Diffstat (limited to 'drivers/phy/phy-core.c')
-rw-r--r-- | drivers/phy/phy-core.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c index c64a2f3b2d62..49c446530101 100644 --- a/drivers/phy/phy-core.c +++ b/drivers/phy/phy-core.c @@ -614,8 +614,9 @@ struct phy *phy_create(struct device *dev, const struct phy_ops *ops, return phy; put_dev: - put_device(&phy->dev); - ida_remove(&phy_ida, phy->id); + put_device(&phy->dev); /* calls phy_release() which frees resources */ + return ERR_PTR(ret); + free_phy: kfree(phy); return ERR_PTR(ret); @@ -799,7 +800,7 @@ static void phy_release(struct device *dev) phy = to_phy(dev); dev_vdbg(dev, "releasing '%s'\n", dev_name(dev)); - ida_remove(&phy_ida, phy->id); + ida_simple_remove(&phy_ida, phy->id); kfree(phy); } |