summaryrefslogtreecommitdiffstats
path: root/drivers/pci/msi.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2014-03-17 15:17:07 +0100
committerArnd Bergmann <arnd@arndb.de>2014-03-17 15:17:07 +0100
commit38edc2da5014e70e46a724d97c3ef3dde106331b (patch)
tree590499bacd062e8dd74c6f05a7d811dd714a2d70 /drivers/pci/msi.c
parent937b5991ca7717ceba99014f2ad3f51c85cdb9ad (diff)
parent28b191118c11719bb27db621425a70be28a40e08 (diff)
downloadlinux-38edc2da5014e70e46a724d97c3ef3dde106331b.tar.bz2
Merge tag 'omap-for-v3.15/dt-overo-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/dt
Updates to the .dts files to support more Gumstix boards. These are sent separately from the rest of the .dts changes as these depend on the fixes merged into v3.14-rc4, and needed a bit more time to get updated on the fixes. * tag 'omap-for-v3.15/dt-overo-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: dts: Add support for the Overo Summit ARM: dts: Add support for the Overo Chestnut43 ARM: dts: Add support for the Overo Alto35 ARM: dts: Add support for the Overo Gallop43 ARM: dts: Add support for the Overo Palo43 ARM: dts: overo: Add LIS33DE accelerometer ARM: dts: overo: Create a file for common Gumstix peripherals ARM: dts: overo: Push uart3 pinmux down to expansion board ARM: dts: omap3-tobi: Add AT24C01 EEPROM ARM: dts: omap3-tobi: Use include file omap-gpmc-smsc9221 ARM: dts: omap: Add common file for SMSC9221 ARM: dts: omap3-overo: Add HSUSB PHY ARM: dts: omap3-overo: Enable WiFi/BT combo ARM: dts: omap3-overo: Add missing pinctrl ARM: dts: omap3-tobi: Add missing pinctrl ARM: dts: overo: reorganize include files Signed-off-by: Arnd Bergmann <arnd@arndb.de> Conflicts: arch/arm/boot/dts/omap3-overo.dtsi
Diffstat (limited to 'drivers/pci/msi.c')
-rw-r--r--drivers/pci/msi.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index 7a0fec6ce571..955ab7990c5b 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -545,9 +545,15 @@ static int populate_msi_sysfs(struct pci_dev *pdev)
return -ENOMEM;
list_for_each_entry(entry, &pdev->msi_list, list) {
char *name = kmalloc(20, GFP_KERNEL);
+ if (!name)
+ goto error_attrs;
+
msi_dev_attr = kzalloc(sizeof(*msi_dev_attr), GFP_KERNEL);
- if (!msi_dev_attr)
+ if (!msi_dev_attr) {
+ kfree(name);
goto error_attrs;
+ }
+
sprintf(name, "%d", entry->irq);
sysfs_attr_init(&msi_dev_attr->attr);
msi_dev_attr->attr.name = name;
@@ -589,6 +595,7 @@ error_attrs:
++count;
msi_attr = msi_attrs[count];
}
+ kfree(msi_attrs);
return ret;
}
@@ -959,7 +966,6 @@ EXPORT_SYMBOL(pci_disable_msi);
/**
* pci_msix_vec_count - return the number of device's MSI-X table entries
* @dev: pointer to the pci_dev data structure of MSI-X device function
-
* This function returns the number of device's MSI-X table entries and
* therefore the number of MSI-X vectors device is capable of sending.
* It returns a negative errno if the device is not capable of sending MSI-X