]> git.baikalelectronics.ru Git - kernel.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>
Sat, 12 Jul 2014 01:23:49 +0000 (18:23 -0700)
commitccb110ea2ba5798bdc47a126434760f8867db08e
tree95b3336a3ec82f1b434b38747179e69b54cccbd6
parentb50b49556bacb27f54abac437068ebab605693bc
phy: core: Fix error path in phy_create()

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.

Cc: 3.13+ <stable@vger.kernel.org> # 3.13+
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