From: Thierry Reding Date: Mon, 31 Jul 2017 09:18:44 +0000 (+0200) Subject: gpu: host1x: Rewrite conditional for better readability X-Git-Tag: v4.16-rc1~96^2~7^2~48 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1f876c3fceadecbb8753e9a351ae3591d0de610e;p=thirdparty%2Flinux.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 --- diff --git a/drivers/gpu/host1x/dev.c b/drivers/gpu/host1x/dev.c index bf67c3aeb6342..1f916b579e955 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; }