diff options
author | Krzysztof Wilczynski <kw@linux.com> | 2020-05-21 19:04:57 +0000 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2020-05-21 15:23:20 -0500 |
commit | cfbd83d02da73d984bee314ed3b96bdd3bbe7115 (patch) | |
tree | fbc5740ded297d6f6ec8d2ff3291817aee775d92 /drivers/pci/hotplug/shpchp.h | |
parent | adc9fbcd7d04a711b765e8f7f5c2e07cbbac0f20 (diff) | |
download | linux-cfbd83d02da73d984bee314ed3b96bdd3bbe7115.tar.bz2 |
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>
Diffstat (limited to 'drivers/pci/hotplug/shpchp.h')
-rw-r--r-- | drivers/pci/hotplug/shpchp.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/hotplug/shpchp.h b/drivers/pci/hotplug/shpchp.h index f7f13ee5d06e..6e85885b554c 100644 --- a/drivers/pci/hotplug/shpchp.h +++ b/drivers/pci/hotplug/shpchp.h @@ -164,7 +164,7 @@ u8 shpchp_handle_switch_change(u8 hp_slot, struct controller *ctrl); u8 shpchp_handle_presence_change(u8 hp_slot, struct controller *ctrl); u8 shpchp_handle_power_fault(u8 hp_slot, struct controller *ctrl); int shpchp_configure_device(struct slot *p_slot); -int shpchp_unconfigure_device(struct slot *p_slot); +void shpchp_unconfigure_device(struct slot *p_slot); void cleanup_slots(struct controller *ctrl); void shpchp_queue_pushbutton_work(struct work_struct *work); int shpc_init(struct controller *ctrl, struct pci_dev *pdev); |