summaryrefslogtreecommitdiffstats
path: root/drivers/mfd/mfd-core.c
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2016-11-01 11:38:18 +0100
committerLee Jones <lee.jones@linaro.org>2016-11-16 09:50:41 +0000
commit722f191080de641f023feaa7d5648caf377844f5 (patch)
tree85e0ffd8bbfb5148ca2bb6b59704e079a8a8497d /drivers/mfd/mfd-core.c
parentf40584200bc4af7aa4399635b9ac213c62a13ae7 (diff)
downloadop-kernel-dev-722f191080de641f023feaa7d5648caf377844f5.zip
op-kernel-dev-722f191080de641f023feaa7d5648caf377844f5.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/mfd-core.c')
-rw-r--r--drivers/mfd/mfd-core.c2
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);
OpenPOWER on IntegriCloud