Fix checking for NULL instead of error pointer
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@huawei.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user