Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1513205 > unrolled thread
| Started by | Johan Hovold <johan@kernel.org> |
|---|---|
| First post | 2016-11-01 11:40 +0100 |
| Last post | 2016-11-01 11:40 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
[PATCH] mfd: core: fix device reference leak in mfd_clone_cell Johan Hovold <johan@kernel.org> - 2016-11-01 11:40 +0100
| From | Johan Hovold <johan@kernel.org> |
|---|---|
| Date | 2016-11-01 11:40 +0100 |
| Subject | [PATCH] mfd: core: fix device reference leak in mfd_clone_cell |
| Message-ID | <syEE2-7uL-11@gated-at.bofh.it> |
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>
---
drivers/mfd/mfd-core.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/mfd/mfd-core.c b/drivers/mfd/mfd-core.c
index 3ac486a597f3..c57e407020f1 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);
--
2.7.3
Back to top | Article view | linux.kernel
csiph-web