libpayload/libpci: Clean up pci_alloc()

Clean up pci_alloc() and return pointer to allocated memory directly.

Change-Id: Ib2ee8dbfaabbf7a824b4fd75ad7c779393af2900
Signed-off-by: Felix Singer <felix.singer@secunet.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/46345
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
This commit is contained in:
Felix Singer 2020-10-13 17:27:19 +02:00 committed by Nico Huber
parent e1194ae6b6
commit d2ec82d137
1 changed files with 1 additions and 2 deletions

View File

@ -72,8 +72,7 @@ int pci_write_long(struct pci_dev *dev, int pos, u32 data)
struct pci_access *pci_alloc(void)
{
struct pci_access *pacc = malloc(sizeof(*pacc));
return pacc;
return malloc(sizeof(struct pci_access));
}
void pci_init(struct pci_access *pacc)