]> git.baikalelectronics.ru Git - kernel.git/commit
block: nvme-scsi: Catch kcalloc failure
authorAxel Lin <axel.lin@ingics.com>
Sat, 20 Jun 2015 08:29:14 +0000 (16:29 +0800)
committerJens Axboe <axboe@fb.com>
Sat, 20 Jun 2015 16:34:07 +0000 (10:34 -0600)
commit26c8ef23d8d657353ac810d9df6faa0bc520f72e
tree77ba038f4cac07d04b0de9e4c445839418687a86
parente06d6b29c73521ceaf8d6a986231b0ae08ca75d2
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>
drivers/block/nvme-scsi.c