lkml.org 
[lkml]   [2020]   [Dec]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH 0/8] i2c: fix reference leak when pm_runtime_get_sync fails
Date
pm_runtime_get_sync will increment the PM reference count
even failed. Forgetting to putting operation will result
in a reference leak here.

Replace it with pm_runtime_resume_and_get to keep usage
counter balanced.

BTW, pm_runtime_resume_and_get is introduced in v5.10-rc5 as
dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get
to dealwith usage counter")

Qinglang Miao (8):
i2c: cadence: fix reference leak when pm_runtime_get_sync fails
i2c: img-scb: fix reference leak when pm_runtime_get_sync fails
i2c: imx-lpi2c: fix reference leak when pm_runtime_get_sync fails
i2c: imx: fix reference leak when pm_runtime_get_sync fails
i2c: omap: fix reference leak when pm_runtime_get_sync fails
i2c: sprd: fix reference leak when pm_runtime_get_sync fails
i2c: stm32f7: fix reference leak when pm_runtime_get_sync fails
i2c: xiic: fix reference leak when pm_runtime_get_sync fails

drivers/i2c/busses/i2c-cadence.c | 4 ++--
drivers/i2c/busses/i2c-img-scb.c | 4 ++--
drivers/i2c/busses/i2c-imx-lpi2c.c | 2 +-
drivers/i2c/busses/i2c-imx.c | 4 ++--
drivers/i2c/busses/i2c-omap.c | 8 ++++----
drivers/i2c/busses/i2c-sprd.c | 4 ++--
drivers/i2c/busses/i2c-stm32f7.c | 12 ++++++------
drivers/i2c/busses/i2c-xiic.c | 4 ++--
8 files changed, 21 insertions(+), 21 deletions(-)

--
2.23.0

\
 
 \ /
  Last update: 2020-12-01 10:27    [W:0.122 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site