diff options
author | Johan Hovold <johan@kernel.org> | 2016-11-01 11:38:18 +0100 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2016-11-29 08:21:34 +0000 |
commit | dd5a8f20c28732d7eeaa5a9768676e9045c97ce1 (patch) | |
tree | 50b8aaec912cd214389de2b4fe1928836f2cae6c /drivers/mfd | |
parent | 794550ffbf9134f8357b3035b8784f4ead6001d6 (diff) | |
download | op-kernel-dev-dd5a8f20c28732d7eeaa5a9768676e9045c97ce1.zip op-kernel-dev-dd5a8f20c28732d7eeaa5a9768676e9045c97ce1.tar.gz |
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>
Diffstat (limited to 'drivers/mfd')
-rw-r--r-- | drivers/mfd/mfd-core.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mfd/mfd-core.c b/drivers/mfd/mfd-core.c index 3ac486a..c57e407 100644 --- a/drivers/mfd/mfd-core.c +++ b/drivers/mfd/mfd-core.c @@ -399,6 +399,8 @@ int mfd_clone_cell(const char *cell, const char **clones, size_t n_clones) clones[i]); } + put_device(dev); + return 0; } EXPORT_SYMBOL(mfd_clone_cell); |