From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f172.google.com (mail-pg1-f172.google.com [209.85.215.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0F21237C11C for ; Wed, 8 Jul 2026 17:08:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783530541; cv=none; b=GQ/1sGaXUz1FSswSuZqWhVb6Kldmb4WVFWuI/WFCv+rI0fIfpS1LT7WT4C90W8ItybN3gGiDfkDmUnpeqJ0Bf3v8d7ZMdl//nu1XS/NIvINCwBIm6lHWNK0ZOTq4WXcHyovDqmsGJ/AE0WM1roUaKZAqBGyoDtGIPv+jGVbr+4I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783530541; c=relaxed/simple; bh=y63ibAfHhnDr1Nb6JXOTDq6pLbKYjiGMy0A0OM/Ki28=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HBZsYz43JQuhCga5eL5Wss2EOjXKGsRXUVUyZXktT7lOa3TmmSXwU0x+zD+q8T8jWd78ZW4mL0uVlBVPnpOguJsO01yFcyPwtBGzBzsWRtpURhSMTS42XPE2WeONKiBPWuiCCgIL1WHCVTzSzLHZ/mcOEccaDdlzlrDXZTuKls0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=jsEIKxTI; arc=none smtp.client-ip=209.85.215.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jsEIKxTI" Received: by mail-pg1-f172.google.com with SMTP id 41be03b00d2f7-c998fd549a8so646359a12.2 for ; Wed, 08 Jul 2026 10:08:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1783530538; x=1784135338; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=md8EBppxz0EdBnJSTmOs+nL5kWFSgGuR0a6y3m6iXcY=; b=jsEIKxTIzHd9UzrlOcaTD4grkq56mokb51cwuFciJVNYLGmBp8y5xPfctVUtHTWfs4 CUQ4n+sJb2jZO9KHiTGmlRGvaSRwQRyn32ECwcCI/E6ILwwjbmyBGP18QAqVYkQrsDQZ TFbsXcvFtwr2NuIzmAHtqUppHXpAaAPhuVBsZErzF2ZOk1/GOElnpAb/f73X7Nog2Tjl z40ON3nPstQY409rplKusrhbS5vUI5tQ+t3IATOzM93l4zdqxwW8vGqEW1PJFNCdwrK5 iJXQFwSOXENOMiF0VsZZareXptnuKhZRo0kEf1SPfuQwReFhQKn1Myzz5Ov84SC6ut/P tMdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783530538; x=1784135338; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=md8EBppxz0EdBnJSTmOs+nL5kWFSgGuR0a6y3m6iXcY=; b=hKf4qI5UO7EiGoFhzHBO4Xj+XMp7pSNi2/j9zy5TAoClK5KkuIZGy1TuhKh9u5Ky24 mHHSLbUGzyuEmDEwM3UrLriip1BP81+VutvU0yJiDKS3uG0TW4QeHksCcI8AknffL7ew HtiZsINpBysSOmDM5bz4YMGa/yDMd0aT7+Qq3gnb8i8MDbwo6SLM+KzkffeStul+wdmN CLWqZcXrdGX5jtzB/Y8lgWug1yQhkJEuc+CcDlbldd1tHKHUMNIYSpFmLz+TZkpKVX+y mDdB6hV/koelXqfJQ3Na6p9bC79FjUHyM0/kW2Kg3mvDpxtGZWIFW6l7KJll+/Q7dzeV VRFg== X-Forwarded-Encrypted: i=1; AHgh+RqH49AQeCVs2FrRmYGLuFrXPKB9i6mlR/MIenyAlBAwJUwE1VMMn/jZfRMy/BmRWX5c7AqmwrW4HFDGQPc=@vger.kernel.org X-Gm-Message-State: AOJu0YwL94KsFfK3K5B//zshMYOxRdVAmSlypPFWkXmCHgpWw0hKs3js 7DASjrSKH3tLQ0gX4pCcoD3NyfeJ+6HY79ImiuJt1SbHQmt6yzTcyTPX X-Gm-Gg: AfdE7cnOdiSN6DAdLOUeMuyQoUoc0041gKzfPHGANvO3w7pCJhtbllYGT/RqWu+mtaJ seSNg1jGj/dJp38+YzkQaTrL8OzPsGMZSBscamW15T1U1vj4aQivST6pcff205hGXNsv07Ia6FF QCAz/RDjTIjxkwlBx9GmpwhyKnDWtseAptIxt2aX2kSo83286WyOxMAdQgnJo2x2gtysvZAuvKO MiIa89uHogUjvQjZuRzNyRHPaiqU7+iw2iNCD46DtR89c/8WSNVWuyNtgnTG8ciZxHXlXJeSj7k RLJQwg0OnUDWBmLp0/3Pezj6BtPIaIxuKDW4JV7xfoCPiJVoNwFdebQtd1bce8J3mDB58duQalA Hz4L3oWgEs+r8MzGlwLv0QOojPQvd83Z9XUI7ymj1XVqRBXPvcuwNy3rSFtuQC390JkzLFGBRO6 PxfSl1ki8Hs9KSMbF6k/i9XsEau6LOzNhtE2fQ84LFKHE= X-Received: by 2002:a05:6a20:939a:b0:3bd:1db1:380c with SMTP id adf61e73a8af0-3c0bd06fe1fmr4009155637.34.1783530537702; Wed, 08 Jul 2026 10:08:57 -0700 (PDT) Received: from localhost.localdomain ([49.207.223.101]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-13b659666e7sm26602154c88.7.2026.07.08.10.08.53 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 08 Jul 2026 10:08:57 -0700 (PDT) From: Biren Pandya To: niklas.soderlund@ragnatech.se, mchehab@kernel.org, geert+renesas@glider.be, magnus.damm@gmail.com, Laurent Pinchart , Jacopo Mondi , linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Biren Pandya Subject: [PATCH v5 1/4] media: renesas: rcar-csi2: Add missing media_entity_cleanup() Date: Wed, 8 Jul 2026 22:38:45 +0530 Message-ID: <20260708170843.55076-7-birenpandya@gmail.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260708170843.55076-6-birenpandya@gmail.com> References: <20260708170843.55076-6-birenpandya@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The probe error paths and the remove function fail to call media_entity_cleanup() upon teardown. While currently a no-op, calling media_entity_cleanup() is an API requirement for entities initialized with media_entity_pads_init() to prevent memory leaks. Add the missing media_entity_cleanup() calls. Signed-off-by: Biren Pandya Reviewed-by: Jacopo Mondi --- drivers/media/platform/renesas/rcar-csi2.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/media/platform/renesas/rcar-csi2.c b/drivers/media/platform/renesas/rcar-csi2.c index 7305cc4a04cb1..f9c818b0faf7e 100644 --- a/drivers/media/platform/renesas/rcar-csi2.c +++ b/drivers/media/platform/renesas/rcar-csi2.c @@ -2631,6 +2631,7 @@ static int rcsi2_probe(struct platform_device *pdev) v4l2_subdev_cleanup(&priv->subdev); error_pm_runtime: pm_runtime_disable(&pdev->dev); + media_entity_cleanup(&priv->subdev.entity); error_async: v4l2_async_nf_unregister(&priv->notifier); v4l2_async_nf_cleanup(&priv->notifier); @@ -2646,6 +2647,7 @@ static void rcsi2_remove(struct platform_device *pdev) v4l2_async_nf_cleanup(&priv->notifier); v4l2_async_unregister_subdev(&priv->subdev); v4l2_subdev_cleanup(&priv->subdev); + media_entity_cleanup(&priv->subdev.entity); pm_runtime_disable(&pdev->dev); } -- 2.50.1 (Apple Git-155)