diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2017-12-29 12:15:16 +0100 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2018-01-17 15:41:41 +0100 |
commit | c7abb2352c298e8ac2ccfd843f036ae5244d6f35 (patch) | |
tree | 7fbfb980fd5bacb12d8a31633a771a0f96a7ef14 /drivers/pci/hotplug/acpiphp_glue.c | |
parent | PCI: Add #defines for Completion Timeout Disable feature (diff) | |
download | linux-c7abb2352c298e8ac2ccfd843f036ae5244d6f35.tar.xz linux-c7abb2352c298e8ac2ccfd843f036ae5244d6f35.zip |
PCI: Remove unnecessary messages for memory allocation failures
Per ebfdc40969f2 ("checkpatch: attempt to find unnecessary 'out of memory'
messages"), when a memory allocation fails, the memory subsystem emits
generic "out of memory" messages (see slab_out_of_memory() for some of this
logging). Therefore, additional error messages in the caller don't add
much value.
Remove messages that merely report "out of memory".
This preserves some messages that report additional information, e.g.,
allocation failures that mean we drop hotplug events.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
[bhelgaas: changelog, squash patches, make similar changes to acpiphp,
cpqphp, ibmphp, keep warning when dropping hotplug event]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/hotplug/acpiphp_glue.c')
-rw-r--r-- | drivers/pci/hotplug/acpiphp_glue.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c index 5db6f1839dad..96f5b986454a 100644 --- a/drivers/pci/hotplug/acpiphp_glue.c +++ b/drivers/pci/hotplug/acpiphp_glue.c @@ -811,10 +811,8 @@ void acpiphp_enumerate_slots(struct pci_bus *bus) handle = adev->handle; bridge = kzalloc(sizeof(struct acpiphp_bridge), GFP_KERNEL); - if (!bridge) { - acpi_handle_err(handle, "No memory for bridge object\n"); + if (!bridge) return; - } INIT_LIST_HEAD(&bridge->slots); kref_init(&bridge->ref); |