public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Lu Baolu <baolu.lu@linux.intel.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
	dwmw2@infradead.org, joro@8bytes.org, will@kernel.org,
	kyung.min.park@intel.com
Cc: baolu.lu@linux.intel.com, iommu@lists.linux-foundation.org,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] iommu/vt-d: Fix an error handling path in 'intel_prepare_irq_remapping()'
Date: Sun, 11 Apr 2021 15:46:44 +0800	[thread overview]
Message-ID: <f43ba8b7-8977-c1e7-ffa2-7f7b5306c7f2@linux.intel.com> (raw)
In-Reply-To: <98d531caabe66012b4fffc7813fd4b9470afd517.1618124777.git.christophe.jaillet@wanadoo.fr>

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

  reply	other threads:[~2021-04-11  7:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2021-04-15 13:46 ` Joerg Roedel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f43ba8b7-8977-c1e7-ffa2-7f7b5306c7f2@linux.intel.com \
    --to=baolu.lu@linux.intel.com \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=dwmw2@infradead.org \
    --cc=iommu@lists.linux-foundation.org \
    --cc=joro@8bytes.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kyung.min.park@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox