diff options
author | Quentin Lambert <lambert.quentin@gmail.com> | 2014-09-07 14:03:32 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2014-09-24 09:50:53 -0400 |
commit | 79e50e72986c9fcb06d707ce587cfd24fefa33e3 (patch) | |
tree | 1a21fd09d544924c1bc1417840a8569821820516 /drivers/pci/hotplug/ibmphp_core.c | |
parent | 656f978f9af9d8d77436e8159f51f7aa1e673309 (diff) |
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/ibmphp_core.c')
-rw-r--r-- | drivers/pci/hotplug/ibmphp_core.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/pci/hotplug/ibmphp_core.c b/drivers/pci/hotplug/ibmphp_core.c index cfe2afe6e7aa..3efaf4c38528 100644 --- a/drivers/pci/hotplug/ibmphp_core.c +++ b/drivers/pci/hotplug/ibmphp_core.c | |||
@@ -1023,7 +1023,8 @@ static int enable_slot(struct hotplug_slot *hs) | |||
1023 | debug("ENABLING SLOT........\n"); | 1023 | debug("ENABLING SLOT........\n"); |
1024 | slot_cur = hs->private; | 1024 | slot_cur = hs->private; |
1025 | 1025 | ||
1026 | if ((rc = validate(slot_cur, ENABLE))) { | 1026 | rc = validate(slot_cur, ENABLE); |
1027 | if (rc) { | ||
1027 | err("validate function failed\n"); | 1028 | err("validate function failed\n"); |
1028 | goto error_nopower; | 1029 | goto error_nopower; |
1029 | } | 1030 | } |
@@ -1335,17 +1336,20 @@ static int __init ibmphp_init(void) | |||
1335 | for (i = 0; i < 16; i++) | 1336 | for (i = 0; i < 16; i++) |
1336 | irqs[i] = 0; | 1337 | irqs[i] = 0; |
1337 | 1338 | ||
1338 | if ((rc = ibmphp_access_ebda())) | 1339 | rc = ibmphp_access_ebda(); |
1340 | if (rc) | ||
1339 | goto error; | 1341 | goto error; |
1340 | debug("after ibmphp_access_ebda()\n"); | 1342 | debug("after ibmphp_access_ebda()\n"); |
1341 | 1343 | ||
1342 | if ((rc = ibmphp_rsrc_init())) | 1344 | rc = ibmphp_rsrc_init(); |
1345 | if (rc) | ||
1343 | goto error; | 1346 | goto error; |
1344 | debug("AFTER Resource & EBDA INITIALIZATIONS\n"); | 1347 | debug("AFTER Resource & EBDA INITIALIZATIONS\n"); |
1345 | 1348 | ||
1346 | max_slots = get_max_slots(); | 1349 | max_slots = get_max_slots(); |
1347 | 1350 | ||
1348 | if ((rc = ibmphp_register_pci())) | 1351 | rc = ibmphp_register_pci(); |
1352 | if (rc) | ||
1349 | goto error; | 1353 | goto error; |
1350 | 1354 | ||
1351 | if (init_ops()) { | 1355 | if (init_ops()) { |
@@ -1354,7 +1358,8 @@ static int __init ibmphp_init(void) | |||
1354 | } | 1358 | } |
1355 | 1359 | ||
1356 | ibmphp_print_test(); | 1360 | ibmphp_print_test(); |
1357 | if ((rc = ibmphp_hpc_start_poll_thread())) | 1361 | rc = ibmphp_hpc_start_poll_thread(); |
1362 | if (rc) | ||
1358 | goto error; | 1363 | goto error; |
1359 | 1364 | ||
1360 | exit: | 1365 | exit: |