]> www.infradead.org Git - users/jedix/linux-maple.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)
committerChuck Anderson <chuck.anderson@oracle.com>
Wed, 6 Jul 2016 23:31:46 +0000 (16:31 -0700)
commita83aba9a63476996d11053b8436d8cd39b4c2aa1
tree2c102b7d195bfad119b46e4fcefcbc78f3c00c56
parent0d9dabb6174f3b73cc2ce29d2bc1de337624a779
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>
(cherry picked from commit 51ef72bda70841fddd595142ed0e7e0fc571c500)

Orabug: 22620486
Signed-off-by: Jason Luo <zhangqing.luo@oracle.com>
drivers/block/nvme-scsi.c