PCI/MSI: Fix leak of msi_attrs
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Jan 2014 20:01:12 +0000 (12:01 -0800)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 4 Feb 2014 06:08:48 +0000 (22:08 -0800)
commit13f81c099bee8141f764fd41a1f4b68b93be3296
tree8865b97eee0c27a5bb436243837ec7d13f0892ba
parentb3bac8e57c82e8d3e05f4abcb18c4f0a40656655
PCI/MSI: Fix leak of msi_attrs

Coverity reported that I forgot to clean up some allocated memory on the
error path in populate_msi_sysfs(), so this patch fixes that.

Thanks to Dave Jones for pointing out where the error was, I obviously
can't read code this morning...

Found by Coverity (CID 1163317).

Fixes: 1c51b50c2995 ("PCI/MSI: Export MSI mode using attributes, not kobjects")
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: Dave Jones <davej@redhat.com>
drivers/pci/msi.c