summaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug/pciehp_pci.c
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2013-12-14 13:06:16 -0700
committerBjorn Helgaas <bhelgaas@google.com>2013-12-15 16:07:32 -0700
commit6dae62020f0e6a2ffe424c8cea542fa49d42ec6e (patch)
tree57f76e124dcccc1a84dfe0655e213d3a28351e91 /drivers/pci/hotplug/pciehp_pci.c
parent1a84b99ccbb954ce201024691babfe4d7d9f506f (diff)
downloadop-kernel-dev-6dae62020f0e6a2ffe424c8cea542fa49d42ec6e.zip
op-kernel-dev-6dae62020f0e6a2ffe424c8cea542fa49d42ec6e.tar.gz
PCI: pciehp: Make various functions void since they can't fail
These functions: pcie_enable_notification() pciehp_power_off_slot() pciehp_get_power_status() pciehp_get_attention_status() pciehp_set_attention_status() pciehp_get_latch_status() pciehp_get_adapter_status() pcie_write_cmd() now always return success, so this patch makes them void and drops the error-checking code in their callers. No functional change. Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/hotplug/pciehp_pci.c')
-rw-r--r--drivers/pci/hotplug/pciehp_pci.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/pci/hotplug/pciehp_pci.c b/drivers/pci/hotplug/pciehp_pci.c
index 0e0d0f7..1983551 100644
--- a/drivers/pci/hotplug/pciehp_pci.c
+++ b/drivers/pci/hotplug/pciehp_pci.c
@@ -78,7 +78,7 @@ int pciehp_configure_device(struct slot *p_slot)
int pciehp_unconfigure_device(struct slot *p_slot)
{
- int ret, rc = 0;
+ int rc = 0;
u8 bctl = 0;
u8 presence = 0;
struct pci_dev *dev, *temp;
@@ -88,9 +88,7 @@ int pciehp_unconfigure_device(struct slot *p_slot)
ctrl_dbg(ctrl, "%s: domain:bus:dev = %04x:%02x:00\n",
__func__, pci_domain_nr(parent), parent->number);
- ret = pciehp_get_adapter_status(p_slot, &presence);
- if (ret)
- presence = 0;
+ pciehp_get_adapter_status(p_slot, &presence);
/*
* Stopping an SR-IOV PF device removes all the associated VFs,
OpenPOWER on IntegriCloud