Forward the correct return value -ENOMEM from btrfsic_dev_state_alloc()
too.
Signed-off-by: Allen Pais <allen.lkml@gmail.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
[ adjust changelog ]
Signed-off-by: David Sterba <dsterba@suse.com>
        state = kvzalloc(sizeof(*state), GFP_KERNEL);
        if (!state) {
                pr_info("btrfs check-integrity: allocation failed!\n");
-               return -1;
+               return -ENOMEM;
        }
 
        if (!btrfsic_is_initialized) {
                if (NULL == ds) {
                        pr_info("btrfs check-integrity: kmalloc() failed!\n");
                        mutex_unlock(&btrfsic_mutex);
-                       return -1;
+                       return -ENOMEM;
                }
                ds->bdev = device->bdev;
                ds->state = state;