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
@@ -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) {
|
||||
|
Reference in New Issue
Block a user