[PATCH v2] media: platform: amd: isp4: drop stale list reinit before free
From: Bin Du
Date: Mon May 11 2026 - 23:22:36 EST
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@xxxxxxx>
---
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