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:
parent
e1194ae6b6
commit
d2ec82d137
|
@ -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 *pci_alloc(void)
|
||||||
{
|
{
|
||||||
struct pci_access *pacc = malloc(sizeof(*pacc));
|
return malloc(sizeof(struct pci_access));
|
||||||
return pacc;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void pci_init(struct pci_access *pacc)
|
void pci_init(struct pci_access *pacc)
|
||||||
|
|
Loading…
Reference in New Issue