nvme: refactor nvme_identify_ns_descs error handling
authorChristoph Hellwig <hch@lst.de>
Wed, 25 Mar 2020 13:19:35 +0000 (14:19 +0100)
committerKeith Busch <kbusch@kernel.org>
Wed, 25 Mar 2020 19:51:56 +0000 (04:51 +0900)
commitfb314eb0cbb2e11540d1ae1a7b28346397f621ef
tree9b72ee4b5d7729b49a0568f36d1ac50ceb2e2df7
parentbea54ef53fce57c8b2f11315c9384e43b2ecb321
nvme: refactor nvme_identify_ns_descs error handling

Move the handling of an error into the function from the caller, and
only do it for an actual error on the admin command itself, not the
command parsing, as that should be enough to deal with devices claiming
a bogus version compliance.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
drivers/nvme/host/core.c