]> git.ipfire.org Git - people/ms/linux.git/commit
phy: core: Fix error path in phy_create()
authorRoger Quadros <rogerq@ti.com>
Thu, 10 Jul 2014 06:25:02 +0000 (11:55 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Jul 2014 23:23:13 +0000 (16:23 -0700)
commitca005c773e4a07b067ac9373150bd440837f5b3c
tree8eba0e94c19bc14f5a458cd2066bef79fbf657e3
parentc476b7d083ded8e6a97ac66a78a68abc78343033
phy: core: Fix error path in phy_create()

commit e73b49f1c4e75c44d62585cc3e5b9c7894b61c32 upstream.

Prevent resources from being freed twice in case device_add() call
fails within phy_create(). Also use ida_simple_remove() instead of
ida_remove() as we had used ida_simple_get() to allocate the ida.

Signed-off-by: Roger Quadros <rogerq@ti.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