PCI: Remove assignment from "if" conditions
The following Coccinelle semantic patch was used to find and correct cases of assignments in "if" conditions: @@ expression var, expr; statement S; @@ + var = expr; if( - (var = expr) + var ) S Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
This commit is contained in:

committed by
Bjorn Helgaas

parent
656f978f9a
commit
79e50e7298
@@ -1003,12 +1003,19 @@ int pci_save_state(struct pci_dev *dev)
|
||||
for (i = 0; i < 16; i++)
|
||||
pci_read_config_dword(dev, i * 4, &dev->saved_config_space[i]);
|
||||
dev->state_saved = true;
|
||||
if ((i = pci_save_pcie_state(dev)) != 0)
|
||||
|
||||
i = pci_save_pcie_state(dev);
|
||||
if (i != 0)
|
||||
return i;
|
||||
if ((i = pci_save_pcix_state(dev)) != 0)
|
||||
|
||||
i = pci_save_pcix_state(dev);
|
||||
if (i != 0)
|
||||
return i;
|
||||
if ((i = pci_save_vc_state(dev)) != 0)
|
||||
|
||||
i = pci_save_vc_state(dev);
|
||||
if (i != 0)
|
||||
return i;
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(pci_save_state);
|
||||
|
Reference in New Issue
Block a user