PCI/MSI: Simplify populate_msi_sysfs()
Simplify populate_msi_sysfs() by
- Swapping the order of the two allocations and storing the
msi_dev_attr-derived pointer right after allocation, allowing the
cleanup code to pick things up without extra effort.
- Using kasprintf() instead of the kmalloc()/sprintf() pair.
Signed-off-by:
Jan Beulich <jbeulich@suse.com>
Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com>
Acked-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Loading
Please register or sign in to comment