ACPI / PCI: Fix memory leak in acpi_pci_irq_enable()
authorTomasz Nowicki <tomasz.nowicki@linaro.org>
Mon, 10 Feb 2014 13:00:11 +0000 (14:00 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 18 Feb 2014 14:47:23 +0000 (15:47 +0100)
commitb685f3b1744061aa9ad822548ba9c674de5be7c6
tree8cc708d7adecddfe1f0a9b9de7282499b61875f0
parent6d0abeca3242a88cab8232e4acd7e2bf088f3bc2
ACPI / PCI: Fix memory leak in acpi_pci_irq_enable()

acpi_pci_link_allocate_irq() can return negative gsi even if
entry != NULL.  For that case we have a memory leak, so free
entry before returning from acpi_pci_irq_enable() for gsi < 0.

Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org>
Cc: All applicable <stable@vger.kernel.org>
[rjw: Subject and changelog]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/pci_irq.c