From: Dan Carpenter <dan.carpenter@oracle.com>
To: David Airlie <airlied@linux.ie>, Alexandre Courbot <acourbot@nvidia.com>
Cc: dri-devel@lists.freedesktop.org,
Thierry Reding <treding@nvidia.com>,
kernel-janitors@vger.kernel.org, Ben Skeggs <bskeggs@redhat.com>
Subject: [patch] drm/nouveau/platform: checking for IS_ERR() instead of NULL
Date: Tue, 21 Apr 2015 09:25:07 +0000 [thread overview]
Message-ID: <20150421092507.GB12098@mwanda> (raw)
iommu_domain_alloc() returns NULL on error, it doesn't return error
pointers.
Fixes: 58fd9375c2c5 ('drm/nouveau/platform: probe IOMMU if present')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/gpu/drm/nouveau/nouveau_platform.c b/drivers/gpu/drm/nouveau/nouveau_platform.c
index 775277f..4fbd35d 100644
--- a/drivers/gpu/drm/nouveau/nouveau_platform.c
+++ b/drivers/gpu/drm/nouveau/nouveau_platform.c
@@ -102,7 +102,7 @@ static void nouveau_platform_probe_iommu(struct device *dev,
if (iommu_present(&platform_bus_type)) {
gpu->iommu.domain = iommu_domain_alloc(&platform_bus_type);
- if (IS_ERR(gpu->iommu.domain))
+ if (!gpu->iommu.domain)
goto error;
/*
next reply other threads:[~2015-04-21 9:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-21 9:25 Dan Carpenter [this message]
2015-04-21 9:36 ` [patch] drm/nouveau/platform: checking for IS_ERR() instead of NULL Thierry Reding
2015-04-21 9:43 ` Alexandre Courbot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150421092507.GB12098@mwanda \
--to=dan.carpenter@oracle.com \
--cc=acourbot@nvidia.com \
--cc=airlied@linux.ie \
--cc=bskeggs@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=treding@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox