Commit 4e31bfa3 authored by Nathan Chancellor's avatar Nathan Chancellor Committed by Stephen Boyd

clk: visconti: Remove pointless NULL check in visconti_pll_add_lookup()

Clang warns:

drivers/clk/visconti/pll.c:292:20: warning: address of array 'ctx->clk_data.hws' will always evaluate to 'true' [-Wpointer-bool-conversion]
        if (ctx->clk_data.hws && id)
            ~~~~~~~~~~~~~~^~~ ~~
1 warning generated.

This array cannot be NULL if ctx is not NULL, which is allocated in
visconti_init_pll(), so just remove the check, which matches other clk
drivers.

Fixes: b4cbe606 ("clk: visconti: Add support common clock driver and reset driver")
Link: https://github.com/ClangBuiltLinux/linux/issues/1564Reported-by: default avatarkernel test robot <lkp@intel.com>
Signed-off-by: default avatarNathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/r/20220107183303.2337676-1-nathan@kernel.orgSigned-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent 70faf946
...@@ -289,7 +289,7 @@ static void visconti_pll_add_lookup(struct visconti_pll_provider *ctx, ...@@ -289,7 +289,7 @@ static void visconti_pll_add_lookup(struct visconti_pll_provider *ctx,
struct clk_hw *hw_clk, struct clk_hw *hw_clk,
unsigned int id) unsigned int id)
{ {
if (ctx->clk_data.hws && id) if (id)
ctx->clk_data.hws[id] = hw_clk; ctx->clk_data.hws[id] = hw_clk;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment