All of lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Nathan Chancellor <natechancellor@gmail.com>
Cc: Dmitry Osipenko <digetx@gmail.com>,
	Thierry Reding <thierry.reding@gmail.com>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	Nick Desaulniers <ndesaulniers@google.com>,
	linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org,
	clang-built-linux@googlegroups.com
Subject: Re: [PATCH] memory: tegra30-emc: Remove unnecessary of_node_put in tegra_emc_probe
Date: Mon, 23 Nov 2020 17:30:35 +0100	[thread overview]
Message-ID: <20201123163035.GA209457@kozik-lap> (raw)
In-Reply-To: <20201119195244.1517236-1-natechancellor@gmail.com>

On Thu, Nov 19, 2020 at 12:52:44PM -0700, Nathan Chancellor wrote:
> Clang warns:
> 
> drivers/memory/tegra/tegra30-emc.c:1275:15: warning: variable 'np' is
> uninitialized when used here [-Wuninitialized]
>                 of_node_put(np);
>                             ^~
> drivers/memory/tegra/tegra30-emc.c:1269:24: note: initialize the
> variable 'np' to silence this warning
>         struct device_node *np;
>                               ^
>                                = NULL
> 1 warning generated.
> 
> There does not need to be an of_node_put call in this error handling
> block after the shuffling of the np assignment. Remove it so there is
> no use of uninitialized memory.
> 
> Fixes: 5e00fd90183a ("memory: tegra30-emc: Continue probing if timings are missing in device-tree")
> Link: https://github.com/ClangBuiltLinux/linux/issues/1203
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
> ---
>  drivers/memory/tegra/tegra30-emc.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)

Thanks, applied.

Best regards,
Krzysztof


      parent reply	other threads:[~2020-11-23 16:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-19 19:52 [PATCH] memory: tegra30-emc: Remove unnecessary of_node_put in tegra_emc_probe Nathan Chancellor
2020-11-19 20:00 ` Dmitry Osipenko
2020-11-23 16:30 ` Krzysztof Kozlowski [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=20201123163035.GA209457@kozik-lap \
    --to=krzk@kernel.org \
    --cc=clang-built-linux@googlegroups.com \
    --cc=digetx@gmail.com \
    --cc=jonathanh@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=natechancellor@gmail.com \
    --cc=ndesaulniers@google.com \
    --cc=thierry.reding@gmail.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 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.