* [PATCH] iommu/vt-d: Fix an error handling path in 'intel_prepare_irq_remapping()'
@ 2021-04-11 7:08 Christophe JAILLET
2021-04-11 7:46 ` Lu Baolu
2021-04-15 13:46 ` Joerg Roedel
0 siblings, 2 replies; 3+ messages in thread
From: Christophe JAILLET @ 2021-04-11 7:08 UTC (permalink / raw)
To: dwmw2, baolu.lu, joro, will, kyung.min.park
Cc: iommu, linux-kernel, kernel-janitors, Christophe JAILLET
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 <christophe.jaillet@wanadoo.fr>
---
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;
--
2.27.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] iommu/vt-d: Fix an error handling path in 'intel_prepare_irq_remapping()'
2021-04-11 7:08 [PATCH] iommu/vt-d: Fix an error handling path in 'intel_prepare_irq_remapping()' Christophe JAILLET
@ 2021-04-11 7:46 ` Lu Baolu
2021-04-15 13:46 ` Joerg Roedel
1 sibling, 0 replies; 3+ messages in thread
From: Lu Baolu @ 2021-04-11 7:46 UTC (permalink / raw)
To: Christophe JAILLET, dwmw2, joro, will, kyung.min.park
Cc: baolu.lu, iommu, linux-kernel, kernel-janitors
On 4/11/21 3:08 PM, Christophe JAILLET wrote:
> 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 <christophe.jaillet@wanadoo.fr>
> ---
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] iommu/vt-d: Fix an error handling path in 'intel_prepare_irq_remapping()'
2021-04-11 7:08 [PATCH] iommu/vt-d: Fix an error handling path in 'intel_prepare_irq_remapping()' Christophe JAILLET
2021-04-11 7:46 ` Lu Baolu
@ 2021-04-15 13:46 ` Joerg Roedel
1 sibling, 0 replies; 3+ messages in thread
From: Joerg Roedel @ 2021-04-15 13:46 UTC (permalink / raw)
To: Christophe JAILLET
Cc: dwmw2, baolu.lu, will, kyung.min.park, iommu, linux-kernel,
kernel-janitors
On Sun, Apr 11, 2021 at 09:08:17AM +0200, Christophe JAILLET wrote:
> drivers/iommu/intel/irq_remapping.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-04-15 13:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-11 7:08 [PATCH] iommu/vt-d: Fix an error handling path in 'intel_prepare_irq_remapping()' Christophe JAILLET
2021-04-11 7:46 ` Lu Baolu
2021-04-15 13:46 ` Joerg Roedel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).