projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
268892c
)
gpu: host1x: Rewrite conditional for better readability
author
Thierry Reding
<treding@nvidia.com>
Mon, 31 Jul 2017 09:18:44 +0000
(11:18 +0200)
committer
Thierry Reding
<treding@nvidia.com>
Wed, 13 Dec 2017 12:42:03 +0000
(13:42 +0100)
The current check is slightly difficult to read, rewrite it to improve
that a little.
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/gpu/host1x/dev.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/gpu/host1x/dev.c
b/drivers/gpu/host1x/dev.c
index bf67c3aeb6342e0554d5e568365f2272bf35ef73..1f916b579e9555b938ac981c3163fe8d1ca5a085 100644
(file)
--- 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;
}