mfd: Fix tps6586x_add_subdevs error path
authorAxel Lin <axel.lin@gmail.com>
Tue, 24 Aug 2010 05:47:22 +0000 (13:47 +0800)
committerSamuel Ortiz <sameo@linux.intel.com>
Thu, 28 Oct 2010 22:28:59 +0000 (00:28 +0200)
commit929980ab1b90b5a5c93db9b9b7d58cc6e93049c8
tree99eeed3baf78f5ec197efa124ab0df82a4ae70d6
parent09ff21e0f670a71ea43765cedaab9246fd81540e
mfd: Fix tps6586x_add_subdevs error path

1. return -ENOMEM if platform_device_alloc() fail.
2. call platform_device_put() if platform_device_add() fail.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/mfd/tps6586x.c