wlcore: mesh: handle failure case of pm_runtime_get_sync
Subsystems (3)
PATCH 1/1 wlcore: mesh: handle failure case of pm_runtime_get_sync
Calling pm_runtime_get_sync increments the counter even in case of failure, causing incorrect ref count. Call pm_runtime_put if pm_runtime_get_sync fails.
Signed-off-by Navid Emamdoost <[email protected]>
--- drivers/net/wireless/ti/wlcore/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/wireless/ti/wlcore/main.c +3 -1
@@ -3662,8 +3662,10 @@ void wlcore_regdomain_config(struct wl1271 *wl) goto out; ret =pm_runtime_get_sync (wl->dev); -if (ret <0 ) +if (ret <0 ) { +pm_runtime_put_autosuspend (wl->dev); goto out; + } ret =wlcore_cmd_regdomain_config_locked (wl);if (ret <0 ) {
Signature · 1 line
2.17.1
Quoted 3 lines · Navid Emamdoost
Calling
pm_runtime_get_syncincrements the counter even in case of failure, causing incorrect ref count. Callpm_runtime_putifpm_runtime_get_syncfails.
Looks like we have a similar patch already in Linux next, care to check?
Regards,
Tony
Quoted 5 lines · Navid Emamdoost
Calling
pm_runtime_get_syncincrements the counter even in case of failure, causing incorrect ref count. Callpm_runtime_putifpm_runtime_get_syncfails.Signed-off-by Navid Emamdoost <[email protected]>
Already fixed by another patch.
Patch set to Rejected.
Signature · 3 lines
https://patchwork.kernel.org/patch/11588923/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches