diff options
| author | David Carlier <devnexen@gmail.com> | 2026-03-28 21:17:49 +0300 |
|---|---|---|
| committer | Hans Verkuil <hverkuil+cisco@kernel.org> | 2026-05-05 17:57:02 +0300 |
| commit | 60ca00792bce46ec170c7ed101f376186d4cf8a9 (patch) | |
| tree | ded58d343a688a1590af403f18830b0903383706 /include/linux/timerqueue.h | |
| parent | 54e8f9888547eb916cabcc0bc0bc39730324c9ee (diff) | |
| download | linux-60ca00792bce46ec170c7ed101f376186d4cf8a9.tar.xz | |
media: nuvoton: npcm-video: fix error handling in npcm_video_init()
npcm_video_init() has two error handling issues after
of_reserved_mem_device_init() is called:
When dma_set_mask_and_coherent() fails, the function releases the
reserved memory but does not return, allowing execution to fall through
into npcm_video_ece_init() with a failed DMA configuration.
When npcm_video_ece_init() fails, the function returns an error without
calling of_reserved_mem_device_release(), leaking the reserved memory
association.
Fix both by adding the missing return after the DMA mask failure and
adding the missing of_reserved_mem_device_release() call on the ECE init
error path.
Fixes: 46c15a4ff1f4 ("media: nuvoton: Add driver for NPCM video capture and encoding engine")
Cc: stable@vger.kernel.org
Signed-off-by: David Carlier <devnexen@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Diffstat (limited to 'include/linux/timerqueue.h')
0 files changed, 0 insertions, 0 deletions
