[PATCH] nvme-pci: remove useless assignment in nvme_pci_setup_prps

From: Liu Song
Date: Sat Jul 16 2022 - 07:50:17 EST


From: Liu Song <liusong@xxxxxxxxxxxxxxxxx>

If prp_list is NULL, nvme_unmap_sg will be performed, and the assignment
to first_dma is meaningless, so remove it.

Signed-off-by: Liu Song <liusong@xxxxxxxxxxxxxxxxx>
---
drivers/nvme/host/pci.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 193b447..3872e33 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -670,7 +670,6 @@ static blk_status_t nvme_pci_setup_prps(struct nvme_dev *dev,

prp_list = dma_pool_alloc(pool, GFP_ATOMIC, &prp_dma);
if (!prp_list) {
- iod->first_dma = dma_addr;
iod->npages = -1;
return BLK_STS_RESOURCE;
}
--
1.8.3.1