mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson@redhat.com>
To: Joerg Roedel <joro@8bytes.org>
Cc: iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org,
	David Woodhouse <dwmw2@infradead.org>,
	Joerg Roedel <jroedel@suse.de>
Subject: Re: [PATCH 2/2] iommu/vt-d: Check return value of acpi_bus_get_device()
Date: Thu, 21 Aug 2014 15:57:08 -0600	[thread overview]
Message-ID: <1408658228.2906.21.camel@ul30vt.home> (raw)
In-Reply-To: <1408657045-4979-3-git-send-email-joro@8bytes.org>

On Thu, 2014-08-21 at 23:37 +0200, Joerg Roedel wrote:
> From: Joerg Roedel <jroedel@suse.de>
> 
> Checking adev == NULL is not sufficient as
> acpi_bus_get_device() might not touch the value of this
> parameter in an error case, so check the return value
> directly.
> 
> Fixes: ed40356b5fcf1ce28e026ab39c5b2b6939068b50
> Cc: David Woodhouse <dwmw2@infradead.org>
> Signed-off-by: Joerg Roedel <jroedel@suse.de>
> ---
>  drivers/iommu/dmar.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c
> index 60ab474..06d268a 100644
> --- a/drivers/iommu/dmar.c
> +++ b/drivers/iommu/dmar.c
> @@ -678,8 +678,7 @@ static int __init dmar_acpi_dev_scope_init(void)
>  				       andd->device_name);
>  				continue;
>  			}
> -			acpi_bus_get_device(h, &adev);
> -			if (!adev) {
> +			if (acpi_bus_get_device(h, &adev)) {
>  				pr_err("Failed to get device for ACPI object %s\n",
>  				       andd->device_name);
>  				continue;

Reviewed-by: Alex Williamson <alex.williamson@redhat.com>


      reply	other threads:[~2014-08-21 21:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-21 21:37 [PATCH 0/2] More IOMMU Fixes Joerg Roedel
2014-08-21 21:37 ` [PATCH 1/2] iommu: Make iommu_group_get_for_dev() more robust Joerg Roedel
2014-08-21 21:54   ` Alex Williamson
2014-08-21 21:37 ` [PATCH 2/2] iommu/vt-d: Check return value of acpi_bus_get_device() Joerg Roedel
2014-08-21 21:57   ` Alex Williamson [this message]

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=1408658228.2906.21.camel@ul30vt.home \
    --to=alex.williamson@redhat.com \
    --cc=dwmw2@infradead.org \
    --cc=iommu@lists.linux-foundation.org \
    --cc=joro@8bytes.org \
    --cc=jroedel@suse.de \
    --cc=linux-kernel@vger.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

all inboxes | Powered by JetHome®