Skip to content

Commit

Permalink
block: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO
Browse files Browse the repository at this point in the history
This patch fixes coccinelle error regarding usage of IS_ERR and
PTR_ERR instead of PTR_ERR_OR_ZERO.

Signed-off-by: Duan Jiong <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
Duan Jiong authored and axboe committed Nov 8, 2013
1 parent 8616ebb commit c7d1ba4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion block/ioctl.c
Original file line number Diff line number Diff line change
@@ -64,7 +64,7 @@ static int blkpg_ioctl(struct block_device *bdev, struct blkpg_ioctl_arg __user
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_ERR_OR_ZERO(part);
case BLKPG_DEL_PARTITION:
part = disk_get_part(disk, partno);
if (!part)

0 comments on commit c7d1ba4

Please sign in to comment.