The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Thomas Meyer <thomas@m3y3r.de>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] gpu: host1x: drm: Cocci spatch "ptr_ret.spatch"
Date: Sat, 01 Jun 2013 12:00:03 +0200	[thread overview]
Message-ID: <1370080803.29224.41.camel@localhost.localdomain> (raw)


Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
---

diff -u -p a/drivers/gpu/host1x/drm/drm.c b/drivers/gpu/host1x/drm/drm.c
--- a/drivers/gpu/host1x/drm/drm.c
+++ b/drivers/gpu/host1x/drm/drm.c
@@ -328,10 +328,7 @@ static int tegra_gem_create(struct drm_d
 
 	bo = tegra_bo_create_with_handle(file, drm, args->size,
 					 &args->handle);
-	if (IS_ERR(bo))
-		return PTR_ERR(bo);
-
-	return 0;
+	return PTR_RET(bo);
 }
 
 static int tegra_gem_mmap(struct drm_device *drm, void *data,
diff -u -p a/drivers/gpu/host1x/drm/gem.c b/drivers/gpu/host1x/drm/gem.c
--- a/drivers/gpu/host1x/drm/gem.c
+++ b/drivers/gpu/host1x/drm/gem.c
@@ -205,10 +205,7 @@ int tegra_bo_dumb_create(struct drm_file
 
 	bo = tegra_bo_create_with_handle(file, drm, args->size,
 					    &args->handle);
-	if (IS_ERR(bo))
-		return PTR_ERR(bo);
-
-	return 0;
+	return PTR_RET(bo);
 }
 
 int tegra_bo_dumb_map_offset(struct drm_file *file, struct drm_device *drm,



                 reply	other threads:[~2013-06-01 10:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1370080803.29224.41.camel@localhost.localdomain \
    --to=thomas@m3y3r.de \
    --cc=linux-kernel@vger.kernel.org \
    /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