Re: [PATCH v5 2/6] iommu/amd: Drop unnecessary checks in amd_iommu_attach_device()

From: Jason Gunthorpe
Date: Thu Sep 22 2022 - 13:24:21 EST


On Thu, Sep 22, 2022 at 01:53:52AM -0700, Nicolin Chen wrote:
> The same checks are done in amd_iommu_probe_device(). If any of them fails
> there, then the device won't get a group, so there's no way for it to even
> reach amd_iommu_attach_device anymore.
>
> Suggested-by: Robin Murphy <robin.murphy@xxxxxxx>
> Cc: Joerg Roedel <joro@xxxxxxxxxx>
> Cc: Suravee Suthikulpanit <suravee.suthikulpanit@xxxxxxx>
> Reviewed-by: Vasant Hegde <vasant.hegde@xxxxxxx>
> Signed-off-by: Nicolin Chen <nicolinc@xxxxxxxxxx>
> ---
> drivers/iommu/amd/iommu.c | 12 ++----------
> 1 file changed, 2 insertions(+), 10 deletions(-)

Reviewed-by: Jason Gunthorpe <jgg@xxxxxxxxxx>

Jason