From: Lee Jones <lee.jones@linaro.org>
To: Johan Hovold <johan@kernel.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mfd: core: fix device reference leak in mfd_clone_cell
Date: Mon, 14 Nov 2016 18:25:01 +0000 [thread overview]
Message-ID: <20161114182501.GC4094@dell> (raw)
In-Reply-To: <1477996698-28870-1-git-send-email-johan@kernel.org>
On Tue, 01 Nov 2016, Johan Hovold wrote:
> 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(+)
Applied, thanks.
> 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);
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
next prev parent reply other threads:[~2016-11-14 18:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-01 10:38 [PATCH] mfd: core: fix device reference leak in mfd_clone_cell Johan Hovold
2016-11-14 18:25 ` Lee Jones [this message]
2016-11-16 9:17 ` Johan Hovold
2016-11-16 9:59 ` Lee Jones
2016-11-16 10:06 ` Johan Hovold
2016-11-16 15:17 ` Lee Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161114182501.GC4094@dell \
--to=lee.jones@linaro.org \
--cc=johan@kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox