diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2018-01-31 11:10:32 -0500 |
---|---|---|
committer | Bjorn Helgaas <helgaas@kernel.org> | 2018-01-31 11:10:32 -0500 |
commit | 412ee7cd3dc581a37b7d15a5147a556e45445be1 (patch) | |
tree | 3a2acd8e946a8f335c8a7671941733a35c72c58e /drivers/pci/hotplug/ibmphp_core.c | |
parent | 85d24b3fc22265d51aa6e8c9e73552750089fa49 (diff) | |
parent | 80db6f08b7af93eddc9487535e6150b220262637 (diff) |
Merge branch 'pci/misc' into next
* pci/misc:
PCI: Add dummy pci_irqd_intx_xlate() for CONFIG_PCI=n build
PCI: Add wrappers for dev_printk()
PCI: Remove unnecessary messages for memory allocation failures
PCI: Add #defines for Completion Timeout Disable feature
hinic: Replace PCI pool old API
net: e100: Replace PCI pool old API
block: DAC960: Replace PCI pool old API
MAINTAINERS: Include more PCI files
PCI: Remove unneeded kallsyms include
powerpc/pci: Unroll two pass loop when scanning bridges
powerpc/pci: Use for_each_pci_bridge() helper
Diffstat (limited to 'drivers/pci/hotplug/ibmphp_core.c')
-rw-r--r-- | drivers/pci/hotplug/ibmphp_core.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/pci/hotplug/ibmphp_core.c b/drivers/pci/hotplug/ibmphp_core.c index 92dd88296817..4985e681e48f 100644 --- a/drivers/pci/hotplug/ibmphp_core.c +++ b/drivers/pci/hotplug/ibmphp_core.c | |||
@@ -603,10 +603,8 @@ int ibmphp_update_slot_info(struct slot *slot_cur) | |||
603 | u8 mode; | 603 | u8 mode; |
604 | 604 | ||
605 | info = kmalloc(sizeof(struct hotplug_slot_info), GFP_KERNEL); | 605 | info = kmalloc(sizeof(struct hotplug_slot_info), GFP_KERNEL); |
606 | if (!info) { | 606 | if (!info) |
607 | err("out of system memory\n"); | ||
608 | return -ENOMEM; | 607 | return -ENOMEM; |
609 | } | ||
610 | 608 | ||
611 | info->power_status = SLOT_PWRGD(slot_cur->status); | 609 | info->power_status = SLOT_PWRGD(slot_cur->status); |
612 | info->attention_status = SLOT_ATTN(slot_cur->status, | 610 | info->attention_status = SLOT_ATTN(slot_cur->status, |
@@ -735,14 +733,12 @@ static u8 bus_structure_fixup(u8 busno) | |||
735 | return 1; | 733 | return 1; |
736 | 734 | ||
737 | bus = kmalloc(sizeof(*bus), GFP_KERNEL); | 735 | bus = kmalloc(sizeof(*bus), GFP_KERNEL); |
738 | if (!bus) { | 736 | if (!bus) |
739 | err("%s - out of memory\n", __func__); | ||
740 | return 1; | 737 | return 1; |
741 | } | 738 | |
742 | dev = kmalloc(sizeof(*dev), GFP_KERNEL); | 739 | dev = kmalloc(sizeof(*dev), GFP_KERNEL); |
743 | if (!dev) { | 740 | if (!dev) { |
744 | kfree(bus); | 741 | kfree(bus); |
745 | err("%s - out of memory\n", __func__); | ||
746 | return 1; | 742 | return 1; |
747 | } | 743 | } |
748 | 744 | ||
@@ -1102,7 +1098,6 @@ static int enable_slot(struct hotplug_slot *hs) | |||
1102 | if (!slot_cur->func) { | 1098 | if (!slot_cur->func) { |
1103 | /* We cannot do update_slot_info here, since no memory for | 1099 | /* We cannot do update_slot_info here, since no memory for |
1104 | * kmalloc n.e.ways, and update_slot_info allocates some */ | 1100 | * kmalloc n.e.ways, and update_slot_info allocates some */ |
1105 | err("out of system memory\n"); | ||
1106 | rc = -ENOMEM; | 1101 | rc = -ENOMEM; |
1107 | goto error_power; | 1102 | goto error_power; |
1108 | } | 1103 | } |
@@ -1209,7 +1204,6 @@ int ibmphp_do_disable_slot(struct slot *slot_cur) | |||
1209 | /* We need this for functions that were there on bootup */ | 1204 | /* We need this for functions that were there on bootup */ |
1210 | slot_cur->func = kzalloc(sizeof(struct pci_func), GFP_KERNEL); | 1205 | slot_cur->func = kzalloc(sizeof(struct pci_func), GFP_KERNEL); |
1211 | if (!slot_cur->func) { | 1206 | if (!slot_cur->func) { |
1212 | err("out of system memory\n"); | ||
1213 | rc = -ENOMEM; | 1207 | rc = -ENOMEM; |
1214 | goto error; | 1208 | goto error; |
1215 | } | 1209 | } |
@@ -1307,7 +1301,6 @@ static int __init ibmphp_init(void) | |||
1307 | 1301 | ||
1308 | ibmphp_pci_bus = kmalloc(sizeof(*ibmphp_pci_bus), GFP_KERNEL); | 1302 | ibmphp_pci_bus = kmalloc(sizeof(*ibmphp_pci_bus), GFP_KERNEL); |
1309 | if (!ibmphp_pci_bus) { | 1303 | if (!ibmphp_pci_bus) { |
1310 | err("out of memory\n"); | ||
1311 | rc = -ENOMEM; | 1304 | rc = -ENOMEM; |
1312 | goto exit; | 1305 | goto exit; |
1313 | } | 1306 | } |