diff options
author | Felix Singer <felix.singer@secunet.com> | 2020-10-13 17:27:19 +0200 |
---|---|---|
committer | Nico Huber <nico.h@gmx.de> | 2020-10-17 16:33:06 +0000 |
commit | d2ec82d137448dc9b851d2d60b715fabdc6e78ec (patch) | |
tree | f5500dfa55227b7783b7a18863ad555f34037e92 /payloads/libpayload/libpci | |
parent | e1194ae6b6b9b02371d1e9e9c3b00aa658f30213 (diff) |
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>
Diffstat (limited to 'payloads/libpayload/libpci')
-rw-r--r-- | payloads/libpayload/libpci/libpci.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/payloads/libpayload/libpci/libpci.c b/payloads/libpayload/libpci/libpci.c index 27347e3bf8..3e3513ccb0 100644 --- a/payloads/libpayload/libpci/libpci.c +++ b/payloads/libpayload/libpci/libpci.c @@ -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) |