[PATCH v2 0/2] media: atomisp: fix probe memory leaks
From: Dawei Feng
Date: Mon Jun 15 2026 - 03:31:42 EST
This series fixes two memory leaks in the atomisp PCI probe and adjusts
cleanup paths.
Patch 1 fixes the cleanup boundary for media entities created during
module initialization. atomisp_uninitialize_modules() did not release all
module-owned state and instead left some media entity cleanup to unregister
helpers. That split is incomplete for probe failures that happen after
module initialization but before all entities are registered, so the
module cleanup path now owns the corresponding media entity cleanup.
Patch 2 adds cleanup for the V4L2 async notifier state initialized by
atomisp_csi2_bridge_parse_firmware(), including notifier connection
cleanup on probe failures and notifier unregister on remove.
Changes in v2:
- Rework patch 1 around the module-init cleanup ownership boundary and
move media_device_cleanup() after module cleanup.
- Add async notifier cleanup as patch 2.
Dawei Feng (2):
media: atomisp: fix memory leak in atomisp_pci_probe()
media: atomisp: fix memory leak in
atomisp_csi2_bridge_parse_firmware()
.../staging/media/atomisp/pci/atomisp_csi2.c | 5 +++-
.../media/atomisp/pci/atomisp_subdev.c | 9 +++++--
.../staging/media/atomisp/pci/atomisp_v4l2.c | 26 ++++++++++++++-----
3 files changed, 30 insertions(+), 10 deletions(-)
--
2.34.1