Re: [PATCH] iommu/vt-d: Fix an error handling path in 'intel_prepare_irq_remapping()'

From
Lu Baolu <baolu.lu@linux.intel.com>
Date
2021-04-11 07:56:33
Also in
linux-iommu, lkml
Reply to
Christophe JAILLET, 2021-04-11
On 4/11/21 3:08 PM, Christophe JAILLET wrote:
quoted hunk ↗ jump to hunk
If 'intel_cap_audit()' fails, we should return directly, as already done in
the surrounding error handling path.

Fixes: ad3d19029979 ("iommu/vt-d: Audit IOMMU Capabilities and add helper functions")
Signed-off-by: Christophe JAILLET <redacted>
---
This patch is completely speculative.
It is based on a spurious mix-up of direct return and goto.
---
  drivers/iommu/intel/irq_remapping.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iommu/intel/irq_remapping.c b/drivers/iommu/intel/irq_remapping.c
index 75429a5373ec..f912fe45bea2 100644
--- a/drivers/iommu/intel/irq_remapping.c
+++ b/drivers/iommu/intel/irq_remapping.c
@@ -736,7 +736,7 @@ static int __init intel_prepare_irq_remapping(void)
  		return -ENODEV;
  
  	if (intel_cap_audit(CAP_AUDIT_STATIC_IRQR, NULL))
-		goto error;
+		return -ENODEV;
  
  	if (!dmar_ir_support())
  		return -ENODEV;
Thanks!

Acked-by: Lu Baolu <baolu.lu@linux.intel.com>

Best regards,
baolu
Thread (3 messages) 3 messages, 3 authors, last reply 2021-04-15
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help