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
@@ -145,7 +145,8 @@ int ibmphp_configure_card (struct pci_func *func, u8 slotno)
|
||||
case PCI_HEADER_TYPE_NORMAL:
|
||||
debug ("single device case.... vendor id = %x, hdr_type = %x, class = %x\n", vendor_id, hdr_type, class);
|
||||
assign_alt_irq (cur_func, class_code);
|
||||
if ((rc = configure_device (cur_func)) < 0) {
|
||||
rc = configure_device(cur_func);
|
||||
if (rc < 0) {
|
||||
/* We need to do this in case some other BARs were properly inserted */
|
||||
err ("was not able to configure devfunc %x on bus %x.\n",
|
||||
cur_func->device, cur_func->busno);
|
||||
@@ -157,7 +158,8 @@ int ibmphp_configure_card (struct pci_func *func, u8 slotno)
|
||||
break;
|
||||
case PCI_HEADER_TYPE_MULTIDEVICE:
|
||||
assign_alt_irq (cur_func, class_code);
|
||||
if ((rc = configure_device (cur_func)) < 0) {
|
||||
rc = configure_device(cur_func);
|
||||
if (rc < 0) {
|
||||
/* We need to do this in case some other BARs were properly inserted */
|
||||
err ("was not able to configure devfunc %x on bus %x...bailing out\n",
|
||||
cur_func->device, cur_func->busno);
|
||||
|
||||
Reference in New Issue
Block a user