[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20201123163035.GA209457@kozik-lap>
Date: Mon, 23 Nov 2020 17:30:35 +0100
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Nathan Chancellor <natechancellor@...il.com>
Cc: Dmitry Osipenko <digetx@...il.com>,
Thierry Reding <thierry.reding@...il.com>,
Jonathan Hunter <jonathanh@...dia.com>,
Nick Desaulniers <ndesaulniers@...gle.com>,
linux-kernel@...r.kernel.org, linux-tegra@...r.kernel.org,
clang-built-linux@...glegroups.com
Subject: Re: [PATCH] memory: tegra30-emc: Remove unnecessary of_node_put in
tegra_emc_probe
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@...il.com>
> ---
> drivers/memory/tegra/tegra30-emc.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
Thanks, applied.
Best regards,
Krzysztof
Powered by blists - more mailing lists