Skip to content

staging: media: ipu7: fix pm_runtime refcount leaks

Vidhu Sarwal linux-media linux-staging lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2staging: media: ipu7: fix pm_runtime refcount leak in ipu7_init_fw_code_region_by_sys()drivers/staging/media/ipu7/ipu7.c+1 -10 replies
2/2staging: media: ipu7: fix pm_runtime refcount leak in ipu7_resume()drivers/staging/media/ipu7/ipu7.c+1 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] staging: media: ipu7: fix pm_runtime refcount leaks

pm_runtime_get_sync() is used in two places in the ipu7 driver before accessing the device. If runtime PM resume fails, the usage count remains incremented, but both error paths return without dropping the reference.

Use pm_runtime_resume_and_get() instead, which balances the usage count on failure and avoids the leaked runtime PM references. This matches the equivalent code in the ipu6 driver.

Vidhu Sarwal (2):
staging: media: ipu7: fix pm_runtime refcount leak in

    ipu7_init_fw_code_region_by_sys()

staging: media: ipu7: fix pm_runtime refcount leak in ipu7_resume()

 drivers/staging/media/ipu7/ipu7.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
2.53.0