From c5fd6b7741deb7bf228973483de433ec134856a2 Mon Sep 17 00:00:00 2001 From: Bixuan Cui Date: Wed, 30 Sep 2020 17:18:38 +0800 Subject: [PATCH] iommu: fix a mistake for iommu_unregister_device_fault_handler ascend inclusion category: bugfix bugzilla: NA CVE: NA ------------------------------------------------- Fix a mistake check for commit bd6c06e0917d ("iommu: introduce device fault report API") Fixes: bd6c06e0917d ("iommu: introduce device fault report API") Signed-off-by: Bixuan Cui Reviewed-by: Hanjun Guo Signed-off-by: Yang Yingliang --- drivers/iommu/iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index cfb52e966bcc..cde37ab00760 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c @@ -982,7 +982,7 @@ int iommu_unregister_device_fault_handler(struct device *dev) mutex_lock(¶m->lock); /* we cannot unregister handler if there are pending faults */ - if (list_empty(¶m->fault_param->faults)) { + if (!list_empty(¶m->fault_param->faults)) { ret = -EBUSY; goto unlock; } -- GitLab