mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-15 15:04:27 +08:00
43a354a21a
This code checks "if (parent_hw)" is non-NULL, but then it has more checks if parent_hw is non-NULL on the lines inside the if statement. It is a bit confusing. For the else statement, keep in mind that at the start of the function we checked: if (!(parent_name || parent_hw)) return ERR_PTR(-EINVAL); That check ensures that if parent_hw is NULL that means that parent_name is non-NULL. At least one must always be non-NULL. So here again, the checks inside the if statement can be removed. In the original code, it was a bit confusing and you could easily get the impression that "init.num_parents" could be zero. When we remove the unnecessary checking it's more obvious that it's always set to 1. Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/7782b4f1-deed-49dc-8207-b6ea06d7602f@moroto.mountain Reviewed-by: Claudiu Beznea <claudiu.beznea@tuxon.dev> Signed-off-by: Stephen Boyd <sboyd@kernel.org> |
||
---|---|---|
.. | ||
at91rm9200.c | ||
at91sam9g45.c | ||
at91sam9n12.c | ||
at91sam9rl.c | ||
at91sam9x5.c | ||
at91sam9260.c | ||
clk-audio-pll.c | ||
clk-generated.c | ||
clk-h32mx.c | ||
clk-i2s-mux.c | ||
clk-main.c | ||
clk-master.c | ||
clk-peripheral.c | ||
clk-pll.c | ||
clk-plldiv.c | ||
clk-programmable.c | ||
clk-sam9x60-pll.c | ||
clk-slow.c | ||
clk-smd.c | ||
clk-system.c | ||
clk-usb.c | ||
clk-utmi.c | ||
dt-compat.c | ||
Makefile | ||
pmc.c | ||
pmc.h | ||
sam9x60.c | ||
sama5d2.c | ||
sama5d3.c | ||
sama5d4.c | ||
sama7g5.c | ||
sckc.c |