Merge "rpmsg: smp2p: use after free for wakeup source"
This commit is contained in:
commit
e2586191c2
@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2014-2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2014-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
#include <linux/module.h>
|
||||
#include <linux/suspend.h>
|
||||
@ -73,7 +73,7 @@ static int smp2p_sleepstate_probe(struct platform_device *pdev)
|
||||
|
||||
notify_ws = wakeup_source_register(&pdev->dev, "smp2p-sleepstate");
|
||||
if (!notify_ws) {
|
||||
return -ENOMEM;
|
||||
ret = -ENOMEM;
|
||||
goto err_ws;
|
||||
}
|
||||
|
||||
@ -95,7 +95,6 @@ static int smp2p_sleepstate_probe(struct platform_device *pdev)
|
||||
return 0;
|
||||
err:
|
||||
wakeup_source_unregister(notify_ws);
|
||||
__pm_relax(notify_ws);
|
||||
err_ws:
|
||||
unregister_pm_notifier(&sleepstate_pm_nb);
|
||||
return ret;
|
||||
|
Loading…
Reference in New Issue
Block a user