dm: do not allocate any mempools for blk-mq request-based DM
[firefly-linux-kernel-4.4.55.git] / drivers / md / dm-table.c
index a5f94125ad01f6b3a3a43fd7ae78e9bad0747995..85e1d39e9a38a568b7c05c1e4d49eda2e9b118fe 100644 (file)
@@ -964,8 +964,8 @@ static int dm_table_alloc_md_mempools(struct dm_table *t, struct mapped_device *
                return -EINVAL;
        }
 
-       if (!t->mempools)
-               return -ENOMEM;
+       if (IS_ERR(t->mempools))
+               return PTR_ERR(t->mempools);
 
        return 0;
 }