Linux Media Controller development
 help / color / mirror / Atom feed
* [PATCH v2] media: platform: amd: isp4: drop stale list reinit before free
@ 2026-05-12  3:21 Bin Du
       [not found] ` <6a02b2c1.050a0220.27c677.bdf0@mx.google.com>
  0 siblings, 1 reply; 2+ messages in thread
From: Bin Du @ 2026-05-12  3:21 UTC (permalink / raw)
  To: mchehab, hverkuil, laurent.pinchart+renesas, bryan.odonoghue,
	sakari.ailus, prabhakar.mahadev-lad.rj, linux-media, linux-kernel,
	sultan
  Cc: ribalda, pratap.nirujogi, benjamin.chan, king.li, Phil.Jawich,
	Dominic.Antony, mario.limonciello, richard.gong, anson.tsao,
	bin.du, Bin Du

Newer Smatch snapshots no longer report the false positive around
isp4if_send_fw_cmd(), so the extra list reinitialization before kfree()
is no longer needed.

Drop the stale list reinit and keep the cleanup path simpler.

Signed-off-by: Bin Du <Bin.Du@amd.com>
---
 drivers/media/platform/amd/isp4/isp4_interface.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/media/platform/amd/isp4/isp4_interface.c b/drivers/media/platform/amd/isp4/isp4_interface.c
index 15f14eddd683..8d73f66bb42c 100644
--- a/drivers/media/platform/amd/isp4/isp4_interface.c
+++ b/drivers/media/platform/amd/isp4/isp4_interface.c
@@ -459,12 +459,6 @@ static int isp4if_send_fw_cmd(struct isp4_interface *ispif, u32 cmd_id,
 		ele = NULL;
 
 free_ele:
-	/*
-	 * The response handler or the timeout/error path must dequeue the
-	 * command element before we own the final reference.
-	 */
-	if (ele)
-		INIT_LIST_HEAD(&ele->list);
 	kfree(ele);
 	return ret;
 }
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-05-12  6:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-12  3:21 [PATCH v2] media: platform: amd: isp4: drop stale list reinit before free Bin Du
     [not found] ` <6a02b2c1.050a0220.27c677.bdf0@mx.google.com>
2026-05-12  6:08   ` [v2] " Bin Du

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