Commit dd214a15 authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman

mfd: core: Fix device reference leak in mfd_clone_cell

commit 722f1910 upstream.

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

Fixes: a9bbba99 ("mfd: add platform_device sharing support for mfd")
Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d2adb5eb
......@@ -354,6 +354,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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment