linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] drm/tegra: Use PTR_ERR_OR_ZERO in tegra_gem_create()
@ 2018-09-25  1:35 YueHaibing
  2018-09-25  7:29 ` Mikko Perttunen
  0 siblings, 1 reply; 5+ messages in thread
From: YueHaibing @ 2018-09-25  1:35 UTC (permalink / raw)
  To: Thierry Reding, David Airlie, Jonathan Hunter
  Cc: linux-tegra, kernel-janitors, YueHaibing, dri-devel

Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/gpu/drm/tegra/drm.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/tegra/drm.c b/drivers/gpu/drm/tegra/drm.c
index e22352c..056f749 100644
--- a/drivers/gpu/drm/tegra/drm.c
+++ b/drivers/gpu/drm/tegra/drm.c
@@ -497,10 +497,7 @@ static int tegra_gem_create(struct drm_device *drm, void *data,
 
 	bo = tegra_bo_create_with_handle(file, drm, args->size, args->flags,
 					 &args->handle);
-	if (IS_ERR(bo))
-		return PTR_ERR(bo);
-
-	return 0;
+	return PTR_ERR_OR_ZERO(bo);
 }
 
 static int tegra_gem_mmap(struct drm_device *drm, void *data,



_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2018-09-25  8:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-25  1:35 [PATCH -next] drm/tegra: Use PTR_ERR_OR_ZERO in tegra_gem_create() YueHaibing
2018-09-25  7:29 ` Mikko Perttunen
2018-09-25  7:37   ` Julia Lawall
2018-09-25  7:57     ` Mikko Perttunen
2018-09-25  8:58       ` 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).