mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
misc: bluedroid_pm: Free proc on failure
If the call to wakeup_source_register() fails during probe, then the 'proc' interface is not freed. Ensure that this is freed as expected. JIRA LINQPJ14-60 Change-Id: I188be2998429c1ada6ccdf765791367e61735359 Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3397251 (cherry picked from commit a0f0bebe2a2a54b87f91b1812c22bbd14470a61c) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3461888 Reviewed-by: Brad Griffis <bgriffis@nvidia.com> GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
7c70fbf0cf
commit
432f3748e0
@@ -472,7 +472,7 @@ static int bluedroid_pm_probe(struct platform_device *pdev)
|
||||
dev_name(&pdev->dev));
|
||||
if (!bluedroid_pm->wake_lock) {
|
||||
BDP_ERR("Failed to register wakeup source");
|
||||
goto free_ext_wake;
|
||||
goto free_bt_proc;
|
||||
}
|
||||
|
||||
/* Initialize timer */
|
||||
@@ -489,6 +489,8 @@ static int bluedroid_pm_probe(struct platform_device *pdev)
|
||||
|
||||
return 0;
|
||||
|
||||
free_bt_proc:
|
||||
remove_bt_proc_interface();
|
||||
free_ext_wake:
|
||||
if (bluedroid_pm->host_wake_irq > -1)
|
||||
free_irq(bluedroid_pm->host_wake_irq, bluedroid_pm);
|
||||
|
||||
Reference in New Issue
Block a user