Linux Media Controller development
 help / color / mirror / Atom feed
From: Bin Du <Bin.Du@amd.com>
To: <mchehab@kernel.org>, <hverkuil@xs4all.nl>,
	<laurent.pinchart+renesas@ideasonboard.com>,
	<bryan.odonoghue@linaro.org>, <sakari.ailus@linux.intel.com>,
	<prabhakar.mahadev-lad.rj@bp.renesas.com>,
	<linux-media@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<sultan@kerneltoast.com>
Cc: <ribalda@chromium.org>, <pratap.nirujogi@amd.com>,
	<benjamin.chan@amd.com>, <king.li@amd.com>, <Phil.Jawich@amd.com>,
	<Dominic.Antony@amd.com>, <mario.limonciello@amd.com>,
	<richard.gong@amd.com>, <anson.tsao@amd.com>, <bin.du@amd.com>,
	Bin Du <Bin.Du@amd.com>
Subject: [PATCH v2] media: platform: amd: isp4: drop stale list reinit before free
Date: Tue, 12 May 2026 11:21:14 +0800	[thread overview]
Message-ID: <20260512032114.292725-1-Bin.Du@amd.com> (raw)

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


             reply	other threads:[~2026-05-12  3:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-12  3:21 Bin Du [this message]
     [not found] ` <6a02b2c1.050a0220.27c677.bdf0@mx.google.com>
2026-05-12  6:08   ` [v2] media: platform: amd: isp4: drop stale list reinit before free Bin Du

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260512032114.292725-1-Bin.Du@amd.com \
    --to=bin.du@amd.com \
    --cc=Dominic.Antony@amd.com \
    --cc=Phil.Jawich@amd.com \
    --cc=anson.tsao@amd.com \
    --cc=benjamin.chan@amd.com \
    --cc=bryan.odonoghue@linaro.org \
    --cc=hverkuil@xs4all.nl \
    --cc=king.li@amd.com \
    --cc=laurent.pinchart+renesas@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mario.limonciello@amd.com \
    --cc=mchehab@kernel.org \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=pratap.nirujogi@amd.com \
    --cc=ribalda@chromium.org \
    --cc=richard.gong@amd.com \
    --cc=sakari.ailus@linux.intel.com \
    --cc=sultan@kerneltoast.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox