diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2015-10-03 20:13:02 +0200 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2015-10-09 18:20:23 +0200 |
commit | 37bfa771cda1734454e4304050cfddbcda5f16ed (patch) | |
tree | f736c99b0145684331f1a1a8cbea2f1dc861b895 /drivers/hwtracing/coresight | |
parent | PCI: mvebu: Move port parsing and resource claiming to separate function (diff) | |
download | linux-37bfa771cda1734454e4304050cfddbcda5f16ed.tar.xz linux-37bfa771cda1734454e4304050cfddbcda5f16ed.zip |
PCI: mvebu: Fix memory leaks and refcount leaks
The mvebu PCI port parsing is weak due to:
1) allocations via kasprintf() were not cleaned up when we encounter an
error or decide to skip the port.
2) kasprintf() wasn't checked for failure.
3) of_get_named_gpio_flags() returns EPROBE_DEFER if the GPIO is not
present, not devm_gpio_request_one().
4) the of_node was not being put when terminating the loop.
Fix these oversights.
Tested-by: Willy Tarreau <w@1wt.eu> (Iomega iConnect Kirkwood, MiraBox Armada 370)
Tested-by: Andrew Lunn <andrew@lunn.ch> (D-Link DIR664 Kirkwood)
Tested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> (Armada XP GP)
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'drivers/hwtracing/coresight')
0 files changed, 0 insertions, 0 deletions