projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7b05bf7
)
pd: fix a NULL vs IS_ERR() check
author
Dan Carpenter
<dan.carpenter@oracle.com>
Fri, 27 Aug 2021 10:00:23 +0000
(13:00 +0300)
committer
Jens Axboe
<axboe@kernel.dk>
Fri, 27 Aug 2021 13:45:48 +0000
(07:45 -0600)
blk_mq_alloc_disk() returns error pointers, it doesn't return NULL
so correct the check.
Fixes: 262d431f9000 ("pd: use blk_mq_alloc_disk and blk_cleanup_disk")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link:
https://lore.kernel.org/r/20210827100023.GB9449@kili
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/paride/pd.c
patch
|
blob
|
history
diff --git
a/drivers/block/paride/pd.c
b/drivers/block/paride/pd.c
index 9b3298926356d81617e61c815c7c279759db3464..675327df6aff98cf63b9c2f824d4bc11023135cb 100644
(file)
--- a/
drivers/block/paride/pd.c
+++ b/
drivers/block/paride/pd.c
@@
-892,7
+892,7
@@
static void pd_probe_drive(struct pd_unit *disk)
return;
p = blk_mq_alloc_disk(&disk->tag_set, disk);
- if (
!p
) {
+ if (
IS_ERR(p)
) {
blk_mq_free_tag_set(&disk->tag_set);
return;
}