Skip to content

Commit 3375dca

Browse files
Dan Carpenteraxboe
authored andcommitted
pd: fix a NULL vs IS_ERR() check
blk_mq_alloc_disk() returns error pointers, it doesn't return NULL so correct the check. Fixes: 262d431 ("pd: use blk_mq_alloc_disk and blk_cleanup_disk") Signed-off-by: Dan Carpenter <[email protected]> Link: https://lore.kernel.org/r/20210827100023.GB9449@kili Signed-off-by: Jens Axboe <[email protected]>
1 parent 7b05bf7 commit 3375dca

File tree

1 file changed

+1
-1
lines changed
  • drivers/block/paride

1 file changed

+1
-1
lines changed

drivers/block/paride/pd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -892,7 +892,7 @@ static void pd_probe_drive(struct pd_unit *disk)
892892
return;
893893

894894
p = blk_mq_alloc_disk(&disk->tag_set, disk);
895-
if (!p) {
895+
if (IS_ERR(p)) {
896896
blk_mq_free_tag_set(&disk->tag_set);
897897
return;
898898
}

0 commit comments

Comments
 (0)