mirror of
https://github.com/ipxe/ipxe
synced 2025-12-13 15:31:42 +03:00
convert to zalloc
This commit is contained in:
@@ -245,12 +245,11 @@ static int pcibus_probe ( struct root_device *rootdev ) {
|
|||||||
|
|
||||||
/* Allocate struct pci_device */
|
/* Allocate struct pci_device */
|
||||||
if ( ! pci )
|
if ( ! pci )
|
||||||
pci = malloc ( sizeof ( *pci ) );
|
pci = zalloc ( sizeof ( *pci ) );
|
||||||
if ( ! pci ) {
|
if ( ! pci ) {
|
||||||
rc = -ENOMEM;
|
rc = -ENOMEM;
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
memset ( pci, 0, sizeof ( *pci ) );
|
|
||||||
pci->bus = bus;
|
pci->bus = bus;
|
||||||
pci->devfn = devfn;
|
pci->devfn = devfn;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user