block: nvme-scsi: Catch kcalloc failure

res variable was initialized to -ENOMEM, but it's override by
nvme_trans_copy_from_user(). So current code returns 0 if kcalloc fails.
Fix it to return proper error code.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
This commit is contained in:
Axel Lin 2015-06-20 16:29:14 +08:00 • committed by Jens Axboe
commit 51ef72bda7