From: Hans de Goede <hdegoede@redhat.com>
To: Ulf Hansson <ulf.hansson@linaro.org>, linux-mmc@vger.kernel.org
Subject: Re: [PATCH] mmc: core: Cleanup unused OF nodes while parsing for child nodes
Date: Mon, 30 Mar 2015 15:37:52 +0200 [thread overview]
Message-ID: <551951B0.7090704@redhat.com> (raw)
In-Reply-To: <1427707141-3152-1-git-send-email-ulf.hansson@linaro.org>
Hi,
On 30-03-15 11:19, Ulf Hansson wrote:
> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
> ---
> drivers/mmc/core/core.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
> index c296bc0..e6b0bdb 100644
> --- a/drivers/mmc/core/core.c
> +++ b/drivers/mmc/core/core.c
> @@ -1291,6 +1291,8 @@ struct device_node *mmc_of_find_child_device(struct mmc_host *host,
> for_each_child_of_node(host->parent->of_node, node) {
> if (mmc_of_get_func_num(node) == func_num)
> return node;
> + else
> + of_node_put(node);
> }
>
> return NULL;
>
I don't think this is right, non of the other users of for_each_child_of_node
do this, I think that rather then doing this we should be changing the callers
of mmc_of_find_child_device to do: of_node_get(), except for the call which
my "mmc: Add support for marking hpi as broken through devicetree" patch adds,
as that is intended to only take a temporary reference.
Regards,
Hans
next prev parent reply other threads:[~2015-03-30 13:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-30 9:19 [PATCH] mmc: core: Cleanup unused OF nodes while parsing for child nodes Ulf Hansson
2015-03-30 13:37 ` Hans de Goede [this message]
2015-03-30 15:09 ` Ulf Hansson
2015-03-31 7:06 ` Hans de Goede
2015-03-31 11:28 ` Ulf Hansson
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=551951B0.7090704@redhat.com \
--to=hdegoede@redhat.com \
--cc=linux-mmc@vger.kernel.org \
--cc=ulf.hansson@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.