nvme-pci: fix leak on sgl setup error
authorKeith Busch <kbusch@kernel.org>
Tue, 29 Jul 2025 18:12:47 +0000 (11:12 -0700)
committerChristoph Hellwig <hch@lst.de>
Thu, 31 Jul 2025 13:35:51 +0000 (06:35 -0700)
commit4e6e151cf92bbaa0622a4da351ff444e4fd9b865
treec537e7468fa834fc27e96192b2caa7b9f532dff9
parent528589947c1802b9357c2a9b96d88cc4a11cd88b
nvme-pci: fix leak on sgl setup error

We need to free the descriptor that was allocated. We also don't
necessarily need to unmap each sgl entry, which was previously being
attempted unconditionally.

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