[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20181206161945.GK16835@8bytes.org>
Date: Thu, 6 Dec 2018 17:19:45 +0100
From: Joerg Roedel <joro@...tes.org>
To: Robin Murphy <robin.murphy@....com>
Cc: iommu@...ts.linux-foundation.org, linux-acpi@...r.kernel.org,
linux-kernel@...r.kernel.org, Joerg Roedel <jroedel@...e.de>
Subject: Re: [PATCH 3/4] iommu/of: Don't call iommu_ops->add_device directly
On Wed, Dec 05, 2018 at 06:49:26PM +0000, Robin Murphy wrote:
> if (ops && dev->bus && !dev->iommu_group)
>
> What I can't quite remember just now is whether it's actually valid to get
> here with err == 0 but dev->iommu_fwspec->ops == NULL, so it *might* be OK
> to use "!err" instead of "ops" to make things slightly more obvious - I'll
> work through the flow tomorrow to double-check.
Yeah, adding an err == 0 check seems to be the best option here, so that
iommu-drivers don't get confused when we try to add a device that is not
managed by an iommu.
Regards,
Joerg
Powered by blists - more mailing lists