Fix checking for NULL instead of error pointer
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@huawei.com>
This commit is contained in:
parent
52d0ff4c7b
commit
7dcb9c92fe
@ -33,8 +33,8 @@ apply() {
|
||||
struct blk_mq_tag_set *tag_set)
|
||||
{
|
||||
*gd = blk_mq_alloc_disk(tag_set, NULL, NULL);
|
||||
if (!(*gd))
|
||||
return -ENOMEM;
|
||||
if (IS_ERR(*gd))
|
||||
return PTR_ERR(*gd);
|
||||
|
||||
*queue = (*gd)->queue;
|
||||
|
||||
@ -53,8 +53,8 @@ apply() {
|
||||
struct blk_mq_tag_set *tag_set)
|
||||
{
|
||||
*gd = blk_mq_alloc_disk(tag_set, NULL);
|
||||
if (!(*gd))
|
||||
return -ENOMEM;
|
||||
if (IS_ERR(*gd))
|
||||
return PTR_ERR(*gd);
|
||||
|
||||
*queue = (*gd)->queue;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user