iommu/vt-d: Silence an uninitialized variable warning
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 6 Apr 2016 18:38:56 +0000 (21:38 +0300)
committerJoerg Roedel <jroedel@suse.de>
Thu, 7 Apr 2016 12:51:47 +0000 (14:51 +0200)
My static checker complains that "dma_alias" is uninitialized unless we
are dealing with a pci device.  This is true but harmless.  Anyway, we
can flip the condition around to silence the warning.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/intel-iommu.c

index a2e1b7f14df29cc78b625ec88455438d0fa1fe07..e1852e845d21f1f8014f7e51789d0e8682c5c8e8 100644 (file)
@@ -2458,7 +2458,7 @@ static struct dmar_domain *get_domain_for_dev(struct device *dev, int gaw)
        }
 
        /* register PCI DMA alias device */
-       if (req_id != dma_alias && dev_is_pci(dev)) {
+       if (dev_is_pci(dev) && req_id != dma_alias) {
                tmp = dmar_insert_one_dev_info(iommu, PCI_BUS_NUM(dma_alias),
                                               dma_alias & 0xff, NULL, domain);