From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: Saravana Kannan <saravanak@google.com>
Cc: kernel-team@android.com, alsa-devel@alsa-project.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] slimbus: core: Fix mismatch in of_node_get/put
Date: Fri, 17 Apr 2020 10:35:41 +0100 [thread overview]
Message-ID: <5b5ec594-9e17-8504-4711-0db8a6a53c22@linaro.org> (raw)
In-Reply-To: <20200326173457.29233-1-saravanak@google.com>
On 26/03/2020 17:34, Saravana Kannan wrote:
> Also, remove some unnecessary NULL checks. The functions in question
> already do NULL checks.
>
> Signed-off-by: Saravana Kannan <saravanak@google.com>
Applied Thanks,
--srini
> ---
> drivers/slimbus/core.c | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/slimbus/core.c b/drivers/slimbus/core.c
> index 44228a5b246d..ae1e248a8fb8 100644
> --- a/drivers/slimbus/core.c
> +++ b/drivers/slimbus/core.c
> @@ -162,11 +162,8 @@ static int slim_add_device(struct slim_controller *ctrl,
> sbdev->ctrl = ctrl;
> INIT_LIST_HEAD(&sbdev->stream_list);
> spin_lock_init(&sbdev->stream_list_lock);
> -
> - if (node) {
> - sbdev->dev.of_node = of_node_get(node);
> - sbdev->dev.fwnode = of_fwnode_handle(node);
> - }
> + sbdev->dev.of_node = of_node_get(node);
> + sbdev->dev.fwnode = of_fwnode_handle(node);
>
> dev_set_name(&sbdev->dev, "%x:%x:%x:%x",
> sbdev->e_addr.manf_id,
> @@ -285,6 +282,7 @@ EXPORT_SYMBOL_GPL(slim_register_controller);
> /* slim_remove_device: Remove the effect of slim_add_device() */
> static void slim_remove_device(struct slim_device *sbdev)
> {
> + of_node_put(sbdev->dev.of_node);
> device_unregister(&sbdev->dev);
> }
>
>
prev parent reply other threads:[~2020-04-17 9:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-26 17:34 [PATCH v1] slimbus: core: Fix mismatch in of_node_get/put Saravana Kannan
2020-04-17 9:35 ` Srinivas Kandagatla [this message]
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=5b5ec594-9e17-8504-4711-0db8a6a53c22@linaro.org \
--to=srinivas.kandagatla@linaro.org \
--cc=alsa-devel@alsa-project.org \
--cc=kernel-team@android.com \
--cc=linux-kernel@vger.kernel.org \
--cc=saravanak@google.com \
/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;
as well as URLs for NNTP newsgroup(s).