Skip to content

Commit d3136d7

Browse files
sambltcmpe
authored andcommitted
powerpc/eeh: Remove always-true tests in eeh_reset_device()
eeh_reset_device() tests the value of 'bus' more than once but the only caller, eeh_handle_normal_device() does this test itself and will never pass NULL. So, remove the dead tests. This should not change behaviour. Signed-off-by: Sam Bobroff <[email protected]> Reviewed-by: Alexey Kardashevskiy <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
1 parent 5fd1346 commit d3136d7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/powerpc/kernel/eeh_driver.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,7 @@ static int eeh_reset_device(struct eeh_pe *pe, struct pci_bus *bus,
655655
pci_hp_remove_devices(bus);
656656
pci_unlock_rescan_remove();
657657
}
658-
} else if (bus) {
658+
} else {
659659
eeh_pe_dev_traverse(pe, eeh_rmv_device, rmv_data);
660660
}
661661

@@ -708,7 +708,7 @@ static int eeh_reset_device(struct eeh_pe *pe, struct pci_bus *bus,
708708
eeh_pe_state_clear(pe, EEH_PE_PRI_BUS);
709709
pci_hp_add_devices(bus);
710710
}
711-
} else if (bus && rmv_data->removed) {
711+
} else if (rmv_data->removed) {
712712
pr_info("EEH: Sleep 5s ahead of partial hotplug\n");
713713
ssleep(5);
714714

0 commit comments

Comments
 (0)