The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Thomas Meyer <thomas@m3y3r.de>
To: axboe@kernel.dk, linux-kernel@vger.kernel.org
Subject: [PATCH] block: Cocci spatch "ptr_ret.spatch"
Date: Sat, 01 Jun 2013 11:45:20 +0200	[thread overview]
Message-ID: <1370079920.29224.17.camel@localhost.localdomain> (raw)


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

diff -u -p a/block/blk-core.c b/block/blk-core.c
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -1626,7 +1626,7 @@ static int __init fail_make_request_debu
 	struct dentry *dir = fault_create_debugfs_attr("fail_make_request",
 						NULL, &fail_make_request);
 
-	return IS_ERR(dir) ? PTR_ERR(dir) : 0;
+	return PTR_RET(dir);
 }
 
 late_initcall(fail_make_request_debugfs);
diff -u -p a/block/blk-timeout.c b/block/blk-timeout.c
--- a/block/blk-timeout.c
+++ b/block/blk-timeout.c
@@ -31,7 +31,7 @@ static int __init fail_io_timeout_debugf
 	struct dentry *dir = fault_create_debugfs_attr("fail_io_timeout",
 						NULL, &fail_io_timeout);
 
-	return IS_ERR(dir) ? PTR_ERR(dir) : 0;
+	return PTR_RET(dir);
 }
 
 late_initcall(fail_io_timeout_debugfs);
diff -u -p a/block/ioctl.c b/block/ioctl.c
--- a/block/ioctl.c
+++ b/block/ioctl.c
@@ -64,7 +64,7 @@ static int blkpg_ioctl(struct block_devi
 			part = add_partition(disk, partno, start, length,
 					     ADDPART_FLAG_NONE, NULL);
 			mutex_unlock(&bdev->bd_mutex);
-			return IS_ERR(part) ? PTR_ERR(part) : 0;
+			return PTR_RET(part);
 		case BLKPG_DEL_PARTITION:
 			part = disk_get_part(disk, partno);
 			if (!part)



                 reply	other threads:[~2013-06-01  9:45 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=1370079920.29224.17.camel@localhost.localdomain \
    --to=thomas@m3y3r.de \
    --cc=axboe@kernel.dk \
    --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