mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-29 23:53:32 +00:00
ACPI: acpi_pci_link_set() can allocate with either GFP_ATOMIC or GFP_KERNEL
acpi_pci_link_set() allocates both with interrupts on and with interrupts off (resume-time), so check interrupts and decide on GFP_ATOMIC or GFP_KERNEL at run-time. Signed-off-by: Jiri Kosina <jikos@jikos.cz> Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
parent
786f18c666
commit
168a328f30
1 changed files with 1 additions and 1 deletions
|
@ -307,7 +307,7 @@ static int acpi_pci_link_set(struct acpi_pci_link *link, int irq)
|
|||
if (!link || !irq)
|
||||
return -EINVAL;
|
||||
|
||||
resource = kmalloc(sizeof(*resource) + 1, GFP_ATOMIC);
|
||||
resource = kmalloc(sizeof(*resource) + 1, irqs_disabled() ? GFP_ATOMIC: GFP_KERNEL);
|
||||
if (!resource)
|
||||
return -ENOMEM;
|
||||
|
||||
|
|
Loading…
Reference in a new issue