nvmet: fix error return code in nvmet_file_ns_enable()
authorWei Yongjun <[email protected]>
Thu, 31 May 2018 11:41:30 +0000 (11:41 +0000)
committerChristoph Hellwig <[email protected]>
Thu, 31 May 2018 16:46:46 +0000 (18:46 +0200)
commit1367bc82858018fd1a5a81b8fad4628e7163d1bf
treea56ba69f7fd73ceb73a6cdca58c2dbaa01e77184
parent81cf54e01a3d2eb47bee78a7579fc4dd0912f347
nvmet: fix error return code in nvmet_file_ns_enable()

Fix to return error code -ENOMEM from the memory alloc fail error
handling case instead of 0, as done elsewhere in this function.

Fixes: d5eff33ee6f8 ("nvmet: add simple file backed ns support")
Signed-off-by: Wei Yongjun <[email protected]>
Reviewed-by: Sagi Grimberg <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
drivers/nvme/target/io-cmd-file.c