* [patch] drm/nouveau/platform: checking for IS_ERR() instead of NULL
@ 2015-04-21 9:25 Dan Carpenter
2015-04-21 9:36 ` Thierry Reding
2015-04-21 9:43 ` Alexandre Courbot
0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2015-04-21 9:25 UTC (permalink / raw)
To: David Airlie, Alexandre Courbot
Cc: dri-devel, Thierry Reding, kernel-janitors, Ben Skeggs
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;
/*
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [patch] drm/nouveau/platform: checking for IS_ERR() instead of NULL
2015-04-21 9:25 [patch] drm/nouveau/platform: checking for IS_ERR() instead of NULL Dan Carpenter
@ 2015-04-21 9:36 ` Thierry Reding
2015-04-21 9:43 ` Alexandre Courbot
1 sibling, 0 replies; 3+ messages in thread
From: Thierry Reding @ 2015-04-21 9:36 UTC (permalink / raw)
To: Dan Carpenter
Cc: David Airlie, Alexandre Courbot, Ben Skeggs, Vince Hsu, dri-devel,
kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 346 bytes --]
On Tue, Apr 21, 2015 at 12:25:07PM +0300, Dan Carpenter wrote:
> 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>
Indeed:
Reviewed-by: Thierry Reding <treding@nvidia.com>
[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch] drm/nouveau/platform: checking for IS_ERR() instead of NULL
2015-04-21 9:25 [patch] drm/nouveau/platform: checking for IS_ERR() instead of NULL Dan Carpenter
2015-04-21 9:36 ` Thierry Reding
@ 2015-04-21 9:43 ` Alexandre Courbot
1 sibling, 0 replies; 3+ messages in thread
From: Alexandre Courbot @ 2015-04-21 9:43 UTC (permalink / raw)
To: Dan Carpenter, David Airlie
Cc: Ben Skeggs, Vince Hsu, Thierry Reding, dri-devel, kernel-janitors
On 04/21/2015 06:25 PM, Dan Carpenter wrote:
> iommu_domain_alloc() returns NULL on error, it doesn't return error
> pointers.
Oops, that's right.
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-04-21 9:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-21 9:25 [patch] drm/nouveau/platform: checking for IS_ERR() instead of NULL Dan Carpenter
2015-04-21 9:36 ` Thierry Reding
2015-04-21 9:43 ` Alexandre Courbot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox