* [PATCH] media: imx-mipi-csis: Remove an incorrect fwnode_handle_put() call
@ 2023-08-30 21:06 Christophe JAILLET
2023-08-31 7:15 ` Laurent Pinchart
2023-08-31 9:16 ` Rui Miguel Silva
0 siblings, 2 replies; 3+ messages in thread
From: Christophe JAILLET @ 2023-08-30 21:06 UTC (permalink / raw)
To: Rui Miguel Silva, Laurent Pinchart, Martin Kepplinger,
Purism Kernel Team, Mauro Carvalho Chehab, Shawn Guo,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
NXP Linux Team, Sakari Ailus
Cc: linux-kernel, kernel-janitors, Christophe JAILLET, linux-media,
linux-arm-kernel
The commit in Fixes has removed an fwnode_graph_get_endpoint_by_id() call
in mipi_csis_subdev_init().
So the reference that was taken should not be released anymore in the
error handling path of the probe and in the remove function.
Remove the now incorrect fwnode_handle_put() calls.
Fixes: 1029939b3782 ("media: v4l: async: Simplify async sub-device fwnode matching")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
drivers/media/platform/nxp/imx-mipi-csis.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/media/platform/nxp/imx-mipi-csis.c b/drivers/media/platform/nxp/imx-mipi-csis.c
index 16f19a640130..5f93712bf485 100644
--- a/drivers/media/platform/nxp/imx-mipi-csis.c
+++ b/drivers/media/platform/nxp/imx-mipi-csis.c
@@ -1490,7 +1490,6 @@ static int mipi_csis_probe(struct platform_device *pdev)
v4l2_async_unregister_subdev(&csis->sd);
err_disable_clock:
mipi_csis_clk_disable(csis);
- fwnode_handle_put(csis->sd.fwnode);
return ret;
}
@@ -1510,7 +1509,6 @@ static void mipi_csis_remove(struct platform_device *pdev)
mipi_csis_clk_disable(csis);
v4l2_subdev_cleanup(&csis->sd);
media_entity_cleanup(&csis->sd.entity);
- fwnode_handle_put(csis->sd.fwnode);
pm_runtime_set_suspended(&pdev->dev);
}
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] media: imx-mipi-csis: Remove an incorrect fwnode_handle_put() call
2023-08-30 21:06 [PATCH] media: imx-mipi-csis: Remove an incorrect fwnode_handle_put() call Christophe JAILLET
@ 2023-08-31 7:15 ` Laurent Pinchart
2023-08-31 9:16 ` Rui Miguel Silva
1 sibling, 0 replies; 3+ messages in thread
From: Laurent Pinchart @ 2023-08-31 7:15 UTC (permalink / raw)
To: Christophe JAILLET
Cc: Rui Miguel Silva, Martin Kepplinger, Purism Kernel Team,
Mauro Carvalho Chehab, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
Sakari Ailus, linux-kernel, kernel-janitors, linux-media,
linux-arm-kernel
Hi Christophe,
Thank you for the patch.
On Wed, Aug 30, 2023 at 11:06:14PM +0200, Christophe JAILLET wrote:
> The commit in Fixes has removed an fwnode_graph_get_endpoint_by_id() call
> in mipi_csis_subdev_init().
> So the reference that was taken should not be released anymore in the
> error handling path of the probe and in the remove function.
>
> Remove the now incorrect fwnode_handle_put() calls.
>
> Fixes: 1029939b3782 ("media: v4l: async: Simplify async sub-device fwnode matching")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> drivers/media/platform/nxp/imx-mipi-csis.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/media/platform/nxp/imx-mipi-csis.c b/drivers/media/platform/nxp/imx-mipi-csis.c
> index 16f19a640130..5f93712bf485 100644
> --- a/drivers/media/platform/nxp/imx-mipi-csis.c
> +++ b/drivers/media/platform/nxp/imx-mipi-csis.c
> @@ -1490,7 +1490,6 @@ static int mipi_csis_probe(struct platform_device *pdev)
> v4l2_async_unregister_subdev(&csis->sd);
> err_disable_clock:
> mipi_csis_clk_disable(csis);
> - fwnode_handle_put(csis->sd.fwnode);
>
> return ret;
> }
> @@ -1510,7 +1509,6 @@ static void mipi_csis_remove(struct platform_device *pdev)
> mipi_csis_clk_disable(csis);
> v4l2_subdev_cleanup(&csis->sd);
> media_entity_cleanup(&csis->sd.entity);
> - fwnode_handle_put(csis->sd.fwnode);
> pm_runtime_set_suspended(&pdev->dev);
> }
>
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] media: imx-mipi-csis: Remove an incorrect fwnode_handle_put() call
2023-08-30 21:06 [PATCH] media: imx-mipi-csis: Remove an incorrect fwnode_handle_put() call Christophe JAILLET
2023-08-31 7:15 ` Laurent Pinchart
@ 2023-08-31 9:16 ` Rui Miguel Silva
1 sibling, 0 replies; 3+ messages in thread
From: Rui Miguel Silva @ 2023-08-31 9:16 UTC (permalink / raw)
To: Christophe JAILLET, Laurent Pinchart, Martin Kepplinger,
Purism Kernel Team, Mauro Carvalho Chehab, Shawn Guo,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
NXP Linux Team, Sakari Ailus
Cc: linux-kernel, kernel-janitors, Christophe JAILLET, linux-media,
linux-arm-kernel
Hi Christophe,
Many thanks for the fix.
Christophe JAILLET <christophe.jaillet@wanadoo.fr> writes:
> The commit in Fixes has removed an fwnode_graph_get_endpoint_by_id() call
> in mipi_csis_subdev_init().
> So the reference that was taken should not be released anymore in the
> error handling path of the probe and in the remove function.
>
> Remove the now incorrect fwnode_handle_put() calls.
>
> Fixes: 1029939b3782 ("media: v4l: async: Simplify async sub-device fwnode matching")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
LGTM.
Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
Cheers,
Rui
> ---
> drivers/media/platform/nxp/imx-mipi-csis.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/media/platform/nxp/imx-mipi-csis.c b/drivers/media/platform/nxp/imx-mipi-csis.c
> index 16f19a640130..5f93712bf485 100644
> --- a/drivers/media/platform/nxp/imx-mipi-csis.c
> +++ b/drivers/media/platform/nxp/imx-mipi-csis.c
> @@ -1490,7 +1490,6 @@ static int mipi_csis_probe(struct platform_device *pdev)
> v4l2_async_unregister_subdev(&csis->sd);
> err_disable_clock:
> mipi_csis_clk_disable(csis);
> - fwnode_handle_put(csis->sd.fwnode);
>
> return ret;
> }
> @@ -1510,7 +1509,6 @@ static void mipi_csis_remove(struct platform_device *pdev)
> mipi_csis_clk_disable(csis);
> v4l2_subdev_cleanup(&csis->sd);
> media_entity_cleanup(&csis->sd.entity);
> - fwnode_handle_put(csis->sd.fwnode);
> pm_runtime_set_suspended(&pdev->dev);
> }
>
> --
> 2.34.1
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-08-31 9:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-30 21:06 [PATCH] media: imx-mipi-csis: Remove an incorrect fwnode_handle_put() call Christophe JAILLET
2023-08-31 7:15 ` Laurent Pinchart
2023-08-31 9:16 ` Rui Miguel Silva
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).