diff options
author | Quentin Lambert <lambert.quentin@gmail.com> | 2014-09-07 20:03:32 +0200 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2014-09-24 07:50:53 -0600 |
commit | 79e50e72986c9fcb06d707ce587cfd24fefa33e3 (patch) | |
tree | 1a21fd09d544924c1bc1417840a8569821820516 /drivers/pci/hotplug/acpi_pcihp.c | |
parent | 656f978f9af9d8d77436e8159f51f7aa1e673309 (diff) | |
download | op-kernel-dev-79e50e72986c9fcb06d707ce587cfd24fefa33e3.zip op-kernel-dev-79e50e72986c9fcb06d707ce587cfd24fefa33e3.tar.gz |
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>
Diffstat (limited to 'drivers/pci/hotplug/acpi_pcihp.c')
-rw-r--r-- | drivers/pci/hotplug/acpi_pcihp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/pci/hotplug/acpi_pcihp.c b/drivers/pci/hotplug/acpi_pcihp.c index a94d850..2cac548 100644 --- a/drivers/pci/hotplug/acpi_pcihp.c +++ b/drivers/pci/hotplug/acpi_pcihp.c @@ -433,7 +433,8 @@ int acpi_pci_check_ejectable(struct pci_bus *pbus, acpi_handle handle) { acpi_handle bridge_handle, parent_handle; - if (!(bridge_handle = acpi_pci_get_bridge_handle(pbus))) + bridge_handle = acpi_pci_get_bridge_handle(pbus); + if (!bridge_handle) return 0; if ((ACPI_FAILURE(acpi_get_parent(handle, &parent_handle)))) return 0; |