Skip to contentSkip to conversation

clk/ti/adpll: remove useless comparison in ti_adpll_free_resources()

PATCH New Andrey Strachuk 1 participant 1 message Jul 19, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clk/ti/adpll: remove useless comparison in ti_adpll_free_resources()

Local variable 'ac' is initialized by an address of field of ti_adpll_data, so it does not make sense to compare 'ac' with NULL.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes 21330497f303 ("clk: ti: Add support for dm814x ADPLL")
---
 drivers/clk/ti/adpll.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/ti/adpll.c +1 -1
index 962502ca7ff0..7207915f9440 100644
@@ -772,7 +772,7 @@ static void ti_adpll_free_resources(struct ti_adpll_data *d)
 	for (i = TI_ADPLL_M3; i >= 0; i--) {
 		struct ti_adpll_clock *ac = &d->clocks[i];
 
-		if (!ac || IS_ERR_OR_NULL(ac->clk))
+		if (IS_ERR_OR_NULL(ac->clk))
 			continue;
 		if (ac->cl)
 			clkdev_drop(ac->cl);
Signature · 1 line
2.25.1