linux/drivers/media/platform/nuvoton
Ricardo Ribalda 453d5cadab media: nuvoton: Fix reference handling of ece_pdev
When we obtain a reference to of a platform_device, we need to release
it via put_device.

Found by cocci:
./platform/nuvoton/npcm-video.c:1677:3-9: ERROR: missing put_device; call of_find_device_by_node on line 1667, but without a corresponding object release within this function.
./platform/nuvoton/npcm-video.c:1684:3-9: ERROR: missing put_device; call of_find_device_by_node on line 1667, but without a corresponding object release within this function.
./platform/nuvoton/npcm-video.c:1690:3-9: ERROR: missing put_device; call of_find_device_by_node on line 1667, but without a corresponding object release within this function.
./platform/nuvoton/npcm-video.c:1694:1-7: ERROR: missing put_device; call of_find_device_by_node on line 1667, but without a corresponding object release within this function.

Instead of manually calling put_device, use the __free macros.

Cc: stable@vger.kernel.org
Fixes: 46c15a4ff1 ("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>
2025-02-25 09:14:06 +01:00
..
Kconfig media: nuvoton: VIDEO_NPCM_VCD_ECE should depend on ARCH_NPCM 2023-10-27 11:44:19 +02:00
Makefile
npcm-regs.h
npcm-video.c media: nuvoton: Fix reference handling of ece_pdev 2025-02-25 09:14:06 +01:00