summaryrefslogtreecommitdiff
path: root/include/linux/timerqueue.h
diff options
context:
space:
mode:
authorGuangshuo Li <lgs201920130244@gmail.com>2026-04-15 18:28:26 +0300
committerHans Verkuil <hverkuil+cisco@kernel.org>2026-05-05 17:57:02 +0300
commit9aa21e1549db8882ff77b691e7714153df21dff0 (patch)
tree21066bc70e363939410112d5edaf773c7870beaa /include/linux/timerqueue.h
parent3eaac9e02d8591d3c790db572ef1c8fa5a841fdb (diff)
downloadlinux-9aa21e1549db8882ff77b691e7714153df21dff0.tar.xz
media: vidtv: fix reference leak on failed device registration
When platform_device_register() fails in vidtv_bridge_init(), the embedded struct device in vidtv_bridge_dev has already been initialized by device_initialize(), but the failure path returns the error without dropping the device reference for the current platform device: vidtv_bridge_init() -> platform_device_register(&vidtv_bridge_dev) -> device_initialize(&vidtv_bridge_dev.dev) -> setup_pdev_dma_masks(&vidtv_bridge_dev) -> platform_device_add(&vidtv_bridge_dev) This leads to a reference leak when platform_device_register() fails. Fix this by calling platform_device_put() before returning the error. The issue was identified by a static analysis tool I developed and confirmed by manual review. Fixes: f90cf6079bf67 ("media: vidtv: add a bridge driver") Cc: stable@vger.kernel.org Signed-off-by: Guangshuo Li <lgs201920130244@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