linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] drm/tegra: checking IS_ERR() instead of NULL
@ 2014-12-04 11:00 Dan Carpenter
  2014-12-04 13:23 ` Thierry Reding
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2014-12-04 11:00 UTC (permalink / raw)
  To: Thierry Reding
  Cc: Terje Bergström, David Airlie, Stephen Warren,
	Alexandre Courbot, dri-devel, linux-tegra, kernel-janitors

iommu_domain_alloc() returns NULL on error, it never returns error
pointers.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/gpu/drm/tegra/drm.c b/drivers/gpu/drm/tegra/drm.c
index e549afe..fa16048 100644
--- a/drivers/gpu/drm/tegra/drm.c
+++ b/drivers/gpu/drm/tegra/drm.c
@@ -36,8 +36,8 @@ static int tegra_drm_load(struct drm_device *drm, unsigned long flags)
 
 	if (iommu_present(&platform_bus_type)) {
 		tegra->domain = iommu_domain_alloc(&platform_bus_type);
-		if (IS_ERR(tegra->domain)) {
-			err = PTR_ERR(tegra->domain);
+		if (!tegra->domain) {
+			err = -ENOMEM;
 			goto free;
 		}
 

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

end of thread, other threads:[~2014-12-05 13:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-04 11:00 [patch] drm/tegra: checking IS_ERR() instead of NULL Dan Carpenter
2014-12-04 13:23 ` Thierry Reding
     [not found]   ` <20141204132349.GD7262-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>
2014-12-05 12:07     ` SF Markus Elfring
     [not found]       ` <54819FFF.4000907-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
2014-12-05 13:19         ` Thierry Reding

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).