Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
bc = kmem_cache_alloc(bsg_cmd_cachep, GFP_USER);
if (unlikely(!bc)) {
spin_lock_irq(&bd->lock);
- goto alloc_fail;
+ bd->queued_cmds--;
+ goto out;
}
memset(bc, 0, sizeof(*bc));
INIT_LIST_HEAD(&bc->list);
dprintk("%s: returning free cmd %p\n", bd->name, bc);
return bc;
-alloc_fail:
- bd->queued_cmds--;
out:
spin_unlock_irq(&bd->lock);
return bc;