mfd: core: Fix device reference leak in mfd_clone_cell
commit 722f191080de641f023feaa7d5648caf377844f5 upstream.
Make sure to drop the reference taken by bus_find_device_by_name()
before returning from mfd_clone_cell().
Fixes: a9bbba9963
("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>
Signed-off-by: Willy Tarreau <w@1wt.eu>
This commit is contained in:
parent
b0a4a2bdaf
commit
1e306daf74
|
@ -263,6 +263,8 @@ int mfd_clone_cell(const char *cell, const char **clones, size_t n_clones)
|
||||||
clones[i]);
|
clones[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
put_device(dev);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(mfd_clone_cell);
|
EXPORT_SYMBOL(mfd_clone_cell);
|
||||||
|
|
Loading…
Reference in New Issue