PCI: shpchp: Make shpchp_unconfigure_device() void
shpchp_unconfigure_device() always returned 0, so there's no reason for a return value. In addition, remove_board() checked the return value for possible error which is unnecessary. Convert shpchp_unconfigure_device() to a void function and remove the return value check. This addresses the following Coccinelle warning: drivers/pci/hotplug/shpchp_pci.c:66:5-7: Unneeded variable: "rc". Return "0" on line 86 Link: https://lore.kernel.org/r/20200521190457.1066600-1-kw@linux.com Signed-off-by: Krzysztof Wilczynski <kw@linux.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
This commit is contained in:

committed by
Bjorn Helgaas

parent
adc9fbcd7d
commit
cfbd83d02d
@@ -341,8 +341,7 @@ static int remove_board(struct slot *p_slot)
|
||||
u8 hp_slot;
|
||||
int rc;
|
||||
|
||||
if (shpchp_unconfigure_device(p_slot))
|
||||
return(1);
|
||||
shpchp_unconfigure_device(p_slot);
|
||||
|
||||
hp_slot = p_slot->device - ctrl->slot_device_offset;
|
||||
p_slot = shpchp_find_slot(ctrl, hp_slot + ctrl->slot_device_offset);
|
||||
|
Reference in New Issue
Block a user