mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] clk/ti/adpll: remove useless comparison in ti_adpll_free_resources()
@ 2022-07-19 10:23 Andrey Strachuk
  0 siblings, 0 replies; only message in thread
From: Andrey Strachuk @ 2022-07-19 10:23 UTC (permalink / raw)
  To: Tero Kristo
  Cc: Andrey Strachuk, Michael Turquette, Stephen Boyd, Tony Lindgren,
	Colin Ian King, linux-omap, linux-kernel, ldv-project

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.

Signed-off-by: Andrey Strachuk <strochuk@ispras.ru>
Fixes: 21330497f303 ("clk: ti: Add support for dm814x ADPLL")
---
 drivers/clk/ti/adpll.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/ti/adpll.c b/drivers/clk/ti/adpll.c
index 962502ca7ff0..7207915f9440 100644
--- a/drivers/clk/ti/adpll.c
+++ b/drivers/clk/ti/adpll.c
@@ -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);
-- 
2.25.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-07-19 10:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-19 10:23 [PATCH] clk/ti/adpll: remove useless comparison in ti_adpll_free_resources() Andrey Strachuk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®