The current check is slightly difficult to read, rewrite it to improve
that a little.
Signed-off-by: Thierry Reding <treding@nvidia.com>
return -ENOMEM;
err = iommu_attach_device(host->domain, &pdev->dev);
- if (err == -ENODEV) {
- iommu_domain_free(host->domain);
- host->domain = NULL;
- goto skip_iommu;
- } else if (err) {
+ if (err) {
+ if (err == -ENODEV) {
+ iommu_domain_free(host->domain);
+ host->domain = NULL;
+ goto skip_iommu;
+ }
+
goto fail_free_domain;
}