提交 c947dfcf 编写于 作者: Z Zhou Guanghui 提交者: Yang Yingliang

iommu: fix NULL pointer when release iopf queue

ascend inclusion
category: bugfix
bugzilla: NA
CVE: NA

----------------------------------

The iopf_queue should be checked when release the related resources.
Since, the value of iopf_queue may be NULL. For example, when the SMMU
does not support the STALL and PRI features or the driver fails to
initialize, the iopf_queue will be NULL pointer.
Signed-off-by: NZhou Guanghui <zhouguanghui1@huawei.com>
Signed-off-by: NBixuan Cui <cuibixuan@huawei.com>
Signed-off-by: Nchenjiankang <chenjiankang1@huawei.com>
Signed-off-by: Nxiangrui <rui.xiang@huawei.com>
Reviewed-by: NHanjun Guo <guohanjun@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 17498bd2
......@@ -3782,7 +3782,9 @@ static int arm_smmu_device_remove(struct platform_device *pdev)
{
struct arm_smmu_device *smmu = platform_get_drvdata(pdev);
if (smmu->iopf_queue)
iopf_queue_free(smmu->iopf_queue);
arm_smmu_device_disable(smmu);
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册