Re: [PATCH v3 3/5] iommu/amd: Split probe error paths to preserve IRQ remapping
Jason Gunthorpe <[email protected]>
| Newsgroups | dev.linux.lists.iommu,org.kernel.vger.linux-kernel,org.kernel.vger.linux-pci |
|---|---|
| Message-ID | <178759520117.3131778.6953869487486713121.b4-review@b4> |
> [ ... 15 lines skipped ... ] > @@ -2540,8 +2540,7 @@ static struct iommu_device *amd_iommu_probe_device(struct device *dev) > ret = PTR_ERR(dev_data); > dev_err(dev, "Failed to initialize - trying to proceed anyway\n"); > iommu_dev = ERR_PTR(ret); I would drop this line and fix the return to have the ERR_PTR > +err_deinit: > + iommu_disable_device(iommu, dev); > out_err: > return iommu_dev; Otherwise this landmine is going to hurt someday since there is only one flow that would have an err ptr in iommu_dev. -- Jason