mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 12:25:00 -04:00
Merge "msm: eva: Fix UAF issue when remove module"
This commit is contained in:
commit
c2a6a9ca1a
1 changed files with 6 additions and 1 deletions
|
|
@ -1,6 +1,7 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/debugfs.h>
|
||||
|
|
@ -491,7 +492,11 @@ static int msm_cvp_remove(struct platform_device *pdev)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
core = dev_get_drvdata(&pdev->dev);
|
||||
if (of_device_is_compatible(pdev->dev.of_node, "qcom,msm-cvp"))
|
||||
core = dev_get_drvdata(&pdev->dev);
|
||||
else
|
||||
core = dev_get_drvdata(pdev->dev.parent);
|
||||
|
||||
if (!core) {
|
||||
dprintk(CVP_ERR, "%s invalid core", __func__);
|
||||
return -EINVAL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue