mirror of https://gitee.com/openkylin/linux.git
gpu: host1x: Rewrite conditional for better readability
The current check is slightly difficult to read, rewrite it to improve that a little. Signed-off-by: Thierry Reding <treding@nvidia.com>
This commit is contained in:
parent
268892cb63
commit
1f876c3fce
|
@ -227,11 +227,13 @@ static int host1x_probe(struct platform_device *pdev)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
err = iommu_attach_device(host->domain, &pdev->dev);
|
err = iommu_attach_device(host->domain, &pdev->dev);
|
||||||
if (err == -ENODEV) {
|
if (err) {
|
||||||
iommu_domain_free(host->domain);
|
if (err == -ENODEV) {
|
||||||
host->domain = NULL;
|
iommu_domain_free(host->domain);
|
||||||
goto skip_iommu;
|
host->domain = NULL;
|
||||||
} else if (err) {
|
goto skip_iommu;
|
||||||
|
}
|
||||||
|
|
||||||
goto fail_free_domain;
|
goto fail_free_domain;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue