]> git.baikalelectronics.ru Git - kernel.git/commit
clk: visconti: Remove pointless NULL check in visconti_pll_add_lookup()
authorNathan Chancellor <nathan@kernel.org>
Fri, 7 Jan 2022 18:33:03 +0000 (11:33 -0700)
committerStephen Boyd <sboyd@kernel.org>
Sat, 8 Jan 2022 00:08:07 +0000 (16:08 -0800)
commit9c4f8a38bcb4e5a4e07a400e2904c31e7eafe7ce
tree206586996e700f3a2a2254075d5574464c45c070
parenta4561f7cc9cbfebc0d7d90b5e38723a6bc8845d1
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: ebf2764e543a ("clk: visconti: Add support common clock driver and reset driver")
Link: https://github.com/ClangBuiltLinux/linux/issues/1564
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/r/20220107183303.2337676-1-nathan@kernel.org
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/visconti/pll.c