nvme: fix error-handling for io_uring nvme-passthrough
authorAnuj Gupta <anuj20.g@samsung.com>
Wed, 18 Oct 2023 19:24:30 +0000 (00:54 +0530)
committerKeith Busch <kbusch@kernel.org>
Mon, 6 Nov 2023 16:09:31 +0000 (08:09 -0800)
commit1147dd0503564fa0e03489a039f9e0c748a03db4
tree53a99599aacc3394e3be0d9d318eabec47abcf84
parent983a338b96c8a25b81e773b643f80634358e81bc
nvme: fix error-handling for io_uring nvme-passthrough

Driver may return an error before submitting the command to the device.
Ensure that such error is propagated up.

Fixes: 456cba386e94 ("nvme: wire-up uring-cmd support for io-passthru on char-device.")
Signed-off-by: Anuj Gupta <anuj20.g@samsung.com>
Signed-off-by: Kanchan Joshi <joshi.k@samsung.com>
Reviewed-by: Niklas Cassel <niklas.cassel@wdc.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
drivers/nvme/host/ioctl.c