Re: [PATCH net] net: ethernet: ti: netcp: fix pm_runtime usage counter leak on error

From: Simon Horman

Date: Tue Sep 22 2026 - 03:28:22 EST


On Fri, Sep 18, 2026 at 11:28:04AM +0700, phucduc.bui@xxxxxxxxx wrote:
> From: bui duc phuc <phucduc.bui@xxxxxxxxx>
>
> pm_runtime_get_sync() leaves the runtime PM usage counter incremented even
> when it fails, but the error path in netcp_probe() does not call
> pm_runtime_put_noidle() to balance it, leaking a reference each time
> resume fails.
>
> Use pm_runtime_resume_and_get() instead, which automatically drops the
> usage counter on failure, fixing the leak.
>
> Fixes: 84640e27f230 ("net: netcp: Add Keystone NetCP core ethernet driver")
> Signed-off-by: bui duc phuc <phucduc.bui@xxxxxxxxx>

Reviewed-by: Simon Horman <horms@xxxxxxxxxx>