diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2017-01-21 05:49:49 +0100 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2017-01-31 01:17:05 +0100 |
commit | 1ded56df3247d358390ae6dc09ccee620262ac5f (patch) | |
tree | 45599518271ae46367189f458763127c5ba2b969 /drivers/pci/hotplug/acpiphp_ibm.c | |
parent | Linux 4.10-rc1 (diff) | |
download | linux-1ded56df3247d358390ae6dc09ccee620262ac5f.tar.xz linux-1ded56df3247d358390ae6dc09ccee620262ac5f.zip |
PCI: xgene: Fix double free on init error
The "port" variable was allocated with devm_kzalloc() so if we free it with
kfree() it will be freed twice. Also I changed it to propogate the error
from devm_ioremap_resource() instead of returning -ENOMEM.
Fixes: c5d460396100 ("PCI: Add MCFG quirks for X-Gene host controller")
Also-posted-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Tanmay Inamdar <tinamdar@apm.com>
Diffstat (limited to 'drivers/pci/hotplug/acpiphp_ibm.c')
0 files changed, 0 insertions, 0 deletions