mfd: core: Fix device reference leak in mfd_clone_cell
authorJohan Hovold <johan@kernel.org>
Tue, 1 Nov 2016 10:38:18 +0000 (11:38 +0100)
committerLee Jones <lee.jones@linaro.org>
Wed, 16 Nov 2016 09:50:41 +0000 (09:50 +0000)
commit722f191080de641f023feaa7d5648caf377844f5
tree85e0ffd8bbfb5148ca2bb6b59704e079a8a8497d
parentf40584200bc4af7aa4399635b9ac213c62a13ae7
mfd: core: Fix device reference leak in mfd_clone_cell

Make sure to drop the reference taken by bus_find_device_by_name()
before returning from mfd_clone_cell().

Fixes: a9bbba996302 ("mfd: add platform_device sharing support for mfd")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/mfd-core.c