summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2017-07-31 11:18:44 +0200
committerThierry Reding <treding@nvidia.com>2017-12-13 13:42:03 +0100
commit1f876c3fceadecbb8753e9a351ae3591d0de610e (patch)
tree355bd8810c0ffc963744ddecdbc0739167349483
parent268892cb63a822315921a8dab48ac3e4abf7dd03 (diff)
downloadop-kernel-dev-1f876c3fceadecbb8753e9a351ae3591d0de610e.zip
op-kernel-dev-1f876c3fceadecbb8753e9a351ae3591d0de610e.tar.gz
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>
-rw-r--r--drivers/gpu/host1x/dev.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/gpu/host1x/dev.c b/drivers/gpu/host1x/dev.c
index bf67c3a..1f916b5 100644
--- a/drivers/gpu/host1x/dev.c
+++ b/drivers/gpu/host1x/dev.c
@@ -227,11 +227,13 @@ static int host1x_probe(struct platform_device *pdev)
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;
}
OpenPOWER on IntegriCloud