diff options
| author | Ricardo Ribalda <ribalda@chromium.org> | 2025-02-24 10:03:54 +0300 |
|---|---|---|
| committer | Hans Verkuil <hverkuil@xs4all.nl> | 2025-02-25 11:14:05 +0300 |
| commit | 8ba4ef40ad6ca62368292a69855324213181abfb (patch) | |
| tree | 06394882636eb54eca7e170f1c6bbf7dded7ebc7 | |
| parent | a980bc5f56b0292336e408f657f79e574e8067c0 (diff) | |
| download | linux-8ba4ef40ad6ca62368292a69855324213181abfb.tar.xz | |
media: nuvoton: Fix reference handling of ece_node
Make sure all the code paths call of_node_put().
Instead of manually calling of_node_put, use the __free macros/helpers.
Cc: stable@vger.kernel.org
Fixes: 46c15a4ff1f4 ("media: nuvoton: Add driver for NPCM video capture and encoding engine")
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
| -rw-r--r-- | drivers/media/platform/nuvoton/npcm-video.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/media/platform/nuvoton/npcm-video.c b/drivers/media/platform/nuvoton/npcm-video.c index 024cd8ee1709..0547f119c38f 100644 --- a/drivers/media/platform/nuvoton/npcm-video.c +++ b/drivers/media/platform/nuvoton/npcm-video.c @@ -1648,8 +1648,8 @@ rel_ctrl_handler: static int npcm_video_ece_init(struct npcm_video *video) { + struct device_node *ece_node __free(device_node) = NULL; struct device *dev = video->dev; - struct device_node *ece_node; struct platform_device *ece_pdev; void __iomem *regs; @@ -1669,7 +1669,6 @@ static int npcm_video_ece_init(struct npcm_video *video) dev_err(dev, "Failed to find ECE device\n"); return -ENODEV; } - of_node_put(ece_node); regs = devm_platform_ioremap_resource(ece_pdev, 0); if (IS_ERR(regs)) { |
