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>
Tue, 29 Nov 2016 08:21:34 +0000 (08:21 +0000)
commitdd5a8f20c28732d7eeaa5a9768676e9045c97ce1
tree50b8aaec912cd214389de2b4fe1928836f2cae6c
parent794550ffbf9134f8357b3035b8784f4ead6001d6
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