Skip to contentSkip to conversation

nvme-pci: remove useless assignment in nvme_pci_setup_prps

PATCH Applied Liu Song 2 participants 2 messages Jul 16, 2022 – Jul 18, 2022 NVMe

lore
Share & tools
lore

Liu Song

author
#0 lore raw

PATCH 1/1 nvme-pci: remove useless assignment in nvme_pci_setup_prps

From: Liu Song <[email protected]>

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

---
 drivers/nvme/host/pci.c | 1 -
 1 file changed, 1 deletion(-)
drivers/nvme/host/pci.c +0 -1
index 193b447..3872e33 100644
@@ -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;
 	}
Signature · 1 line
1.8.3.1