iommu/amd: Remove redundant assignment to variable npages
authorColin Ian King <colin.king@canonical.com>
Sat, 11 May 2019 12:41:35 +0000 (13:41 +0100)
committerJoerg Roedel <jroedel@suse.de>
Mon, 27 May 2019 10:02:56 +0000 (12:02 +0200)
The variable npages is being initialized however this is never read and
later it is being reassigned to a new value. The initialization is
redundant and hence can be removed.

Addresses-Coverity: ("Unused Value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/amd_iommu.c

index 09c9e45f7fa2ec99751f752f4ff6fe30ccd7dfeb..c0b5b9298e8ea27a9babd18f306c4e44add543e5 100644 (file)
@@ -2609,7 +2609,7 @@ static void unmap_sg(struct device *dev, struct scatterlist *sglist,
        struct protection_domain *domain;
        struct dma_ops_domain *dma_dom;
        unsigned long startaddr;
-       int npages = 2;
+       int npages;
 
        domain = get_domain(dev);
        if (IS_ERR(domain))