]> git.dujemihanovic.xyz Git - u-boot.git/commit
clk: check parent_name in clk_register to avoid confusing log_error() output
authorYang Xiwen <forbidden405@outlook.com>
Fri, 10 Nov 2023 19:19:52 +0000 (03:19 +0800)
committerSean Anderson <seanga2@gmail.com>
Fri, 15 Dec 2023 17:31:15 +0000 (12:31 -0500)
commit09844d0de5550e7f91246031220074a80b5a821a
treee7394b5d86c8f4a6c1d2bff58d3cf56c4f88ff97
parent3ac22891cfc0dc6d8eec25d2b0fbdd2eb8f3d3ed
clk: check parent_name in clk_register to avoid confusing log_error() output

For some gate clocks and fixed clocks without a parent, calling
clk_register will print an useless error message indicating that parent
is missing. Fix that by gaurding log_xxx() with an if-statement.

Signed-off-by: Yang Xiwen <forbidden405@outlook.com>
Suggested-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Sean Anderson <seanga2@gmail.com>
Link: https://lore.kernel.org/r/20230807-clk-fix-v2-1-0b688e21fb4e@outlook.com
drivers/clk/clk.c