]> git.baikalelectronics.ru Git - kernel.git/commitdiff
nvme-pci: remove useless assignment in nvme_pci_setup_prps
authorLiu Song <liusong@linux.alibaba.com>
Sat, 16 Jul 2022 11:49:41 +0000 (19:49 +0800)
committerJens Axboe <axboe@kernel.dk>
Tue, 2 Aug 2022 23:22:48 +0000 (17:22 -0600)
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@linux.alibaba.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/host/pci.c

index d8d0aeb6fa0a664528612f86578dacf31d3a80db..36b8c0e2bb7cc714b387579f822f08e036008d79 100644 (file)
@@ -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;
        }