linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/nouveau/tegra: Fix error handling
@ 2016-10-31  6:35 Christophe JAILLET
  2016-11-02  4:59 ` Alexandre Courbot
  0 siblings, 1 reply; 2+ messages in thread
From: Christophe JAILLET @ 2016-10-31  6:35 UTC (permalink / raw)
  To: bskeggs-H+wXaHxf7aLQT0dZR+AlfA, airlied-cv59FeDIM0c,
	swarren-3lzwWm7+Weoh9ZMKESR00Q,
	thierry.reding-Re5JQEeQqe8AvxtiuMwx3w,
	gnurou-Re5JQEeQqe8AvxtiuMwx3w
  Cc: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	kernel-janitors-u79uwXL29TY76Z2rM5mHXA, Christophe JAILLET

'iommu_domain_alloc()' returns NULL in case of error, not an error pointer.
So test it accordingly.

Signed-off-by: Christophe JAILLET <christophe.jaillet-39ZsbGIQGT5GWvitb5QawA@public.gmane.org>
---
 drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c
index 9b638bd905ff..f2bc0b7d9b93 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c
@@ -102,7 +102,7 @@ nvkm_device_tegra_probe_iommu(struct nvkm_device_tegra *tdev)
 
 	if (iommu_present(&platform_bus_type)) {
 		tdev->iommu.domain = iommu_domain_alloc(&platform_bus_type);
-		if (IS_ERR(tdev->iommu.domain))
+		if (!tdev->iommu.domain)
 			goto error;
 
 		/*
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] drm/nouveau/tegra: Fix error handling
  2016-10-31  6:35 [PATCH] drm/nouveau/tegra: Fix error handling Christophe JAILLET
@ 2016-11-02  4:59 ` Alexandre Courbot
  0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Courbot @ 2016-11-02  4:59 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: Ben Skeggs, David Airlie, Stephen Warren, Thierry Reding,
	dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org,
	linux-tegra@vger.kernel.org, Linux Kernel Mailing List,
	kernel-janitors

On Mon, Oct 31, 2016 at 3:35 PM, Christophe JAILLET
<christophe.jaillet@wanadoo.fr> wrote:
> 'iommu_domain_alloc()' returns NULL in case of error, not an error pointer.
> So test it accordingly.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>

Indeed. Thanks for the fix!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-11-02  4:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-31  6:35 [PATCH] drm/nouveau/tegra: Fix error handling Christophe JAILLET
2016-11-02  4:59 ` Alexandre Courbot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).