aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/pci/hotplug/shpchp_hpc.c
diff options
context:
space:
mode:
authorQuentin Lambert <lambert.quentin@gmail.com>2014-09-07 20:03:32 +0200
committerBjorn Helgaas <bhelgaas@google.com>2014-09-24 07:50:53 -0600
commit79e50e72986c9fcb06d707ce587cfd24fefa33e3 (patch)
tree1a21fd09d544924c1bc1417840a8569821820516 /drivers/pci/hotplug/shpchp_hpc.c
parentPCI: Remove unnecessary curly braces (diff)
downloadwireguard-linux-79e50e72986c9fcb06d707ce587cfd24fefa33e3.tar.xz
wireguard-linux-79e50e72986c9fcb06d707ce587cfd24fefa33e3.zip
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/shpchp_hpc.c')
-rw-r--r--drivers/pci/hotplug/shpchp_hpc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/pci/hotplug/shpchp_hpc.c b/drivers/pci/hotplug/shpchp_hpc.c
index 1d89916351ed..7d223e9080ef 100644
--- a/drivers/pci/hotplug/shpchp_hpc.c
+++ b/drivers/pci/hotplug/shpchp_hpc.c
@@ -466,7 +466,8 @@ static int hpc_get_adapter_speed(struct slot *slot, enum pci_bus_speed *value)
u8 m66_cap = !!(slot_reg & MHZ66_CAP);
u8 pi, pcix_cap;
- if ((retval = hpc_get_prog_int(slot, &pi)))
+ retval = hpc_get_prog_int(slot, &pi);
+ if (retval)
return retval;
switch (pi) {