FAILED: patch "[PATCH] drm/imx/tve: fix probe device leak" failed to apply to 6.1-stable tree
Subsystems (5)
[email protected]
maintainerThe patch below does not apply to the 6.1-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.1.y
git checkout FETCH_HEAD
git cherry-pick -x e535c23513c63f02f67e3e09e0787907029efeaf
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026020322-mascot-usage-c825@gregkh' --subject-prefix 'PATCH 6.1.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From e535c23513c63f02f67e3e09e0787907029efeaf Mon Sep 17 00:00:00 2001
From: Johan Hovold <[email protected]>
Date: Thu, 30 Oct 2025 17:34:56 +0100
Subject: [PATCH] drm/imx/tve: fix probe device leak
Make sure to drop the reference taken to the DDC device during probe on probe failure (e.g. probe deferral) and on driver unbind.
drivers/gpu/drm/imx/ipuv3/imx-tve.c +13 -0
@@ -528,6 +528,13 @@ static const struct component_ops imx_tve_ops = { .bind = imx_tve_bind, }; +static void imx_tve_put_device (void *_dev) +{ +struct device *dev = _dev; + +put_device (dev); +} +static int imx_tve_probe (struct platform_device *pdev) {struct device *dev = &pdev->dev;
@@ -549,6 +556,12 @@ static int imx_tve_probe(struct platform_device *pdev)if (ddc_node) { tve->ddc =of_find_i2c_adapter_by_node (ddc_node);of_node_put (ddc_node); +if (tve->ddc) { + ret =devm_add_action_or_reset (dev, imx_tve_put_device, + &tve->ddc->dev); +if (ret) +return ret; + } } tve->mode =of_get_tve_mode (np);
Sasha Levin
maintainerPATCH 1/1 drm/imx/tve: fix probe device leak
From: Johan Hovold <[email protected]>
[ Upstream commit e535c23513c63f02f67e3e09e0787907029efeaf ]
Make sure to drop the reference taken to the DDC device during probe on probe failure (e.g. probe deferral) and on driver unbind.
--- drivers/gpu/drm/imx/imx-tve.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
drivers/gpu/drm/imx/imx-tve.c +13 -0
@@ -522,6 +522,13 @@ static const struct component_ops imx_tve_ops = { .bind = imx_tve_bind, }; +static void imx_tve_put_device (void *_dev) +{ +struct device *dev = _dev; + +put_device (dev); +} +static int imx_tve_probe (struct platform_device *pdev) {struct device *dev = &pdev->dev;
@@ -543,6 +550,12 @@ static int imx_tve_probe(struct platform_device *pdev)if (ddc_node) { tve->ddc =of_find_i2c_adapter_by_node (ddc_node);of_node_put (ddc_node); +if (tve->ddc) { + ret =devm_add_action_or_reset (dev, imx_tve_put_device, + &tve->ddc->dev); +if (ret) +return ret; + } } tve->mode =of_get_tve_mode (np);
Signature · 1 line
2.51.0