[PATCH -next] i2c: imx-lpi2c: fix PM reference leak in lpi2c_imx_master_enable()

Wolfram Sang wsa at kernel.org
Wed Apr 14 08:56:49 BST 2021


On Thu, Apr 08, 2021 at 07:19:30PM +0800, Ye Weihua wrote:
> The PM reference count is not expected to be incremented on return in
> ipi2c_imx_master_enable().
> 
> However, pm_runtime_get_sync() will increment the PM reference count
> even on failure. forgetting to put the reference again will result in
> a leak.
> 
> Replace it with pm_runtime_resume_and_get() to keep the usage counter
> balanced.
> 
> Reported-by: Hulk Robot <hulkci at huawei.com>
> Signed-off-by: Ye Weihua <yeweihua4 at huawei.com>

Thanks, yet I applied this series now:

http://patchwork.ozlabs.org/project/linux-i2c/list/?series=217733&state=*

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20210414/5d9696c0/attachment.sig>


More information about the linux-arm-kernel mailing list