david/ipxe
david
/
ipxe
Archived
1
0
Fork 0

Merge branch 'zalloc'

This commit is contained in:
Michael Brown 2007-07-07 04:01:52 +01:00
commit 627feee265
5 changed files with 10 additions and 5 deletions

View File

@ -106,11 +106,12 @@ static int eisabus_probe ( struct root_device *rootdev ) {
for ( slot = EISA_MIN_SLOT ; slot <= EISA_MAX_SLOT ; slot++ ) {
/* Allocate struct eisa_device */
if ( ! eisa )
eisa = zalloc ( sizeof ( *eisa ) );
eisa = malloc ( sizeof ( *eisa ) );
if ( ! eisa ) {
rc = -ENOMEM;
goto err;
}
memset ( eisa, 0, sizeof ( *eisa ) );
eisa->slot = slot;
eisa->ioaddr = EISA_SLOT_BASE ( eisa->slot );

View File

@ -105,11 +105,12 @@ static int isabus_probe ( struct root_device *rootdev ) {
ioidx <= ISA_IOIDX_MAX ( driver ) ; ioidx++ ) {
/* Allocate struct isa_device */
if ( ! isa )
isa = zalloc ( sizeof ( *isa ) );
isa = malloc ( sizeof ( *isa ) );
if ( ! isa ) {
rc = -ENOMEM;
goto err;
}
memset ( isa, 0, sizeof ( *isa ) );
isa->driver = driver;
isa->ioaddr = ISA_IOADDR ( driver, ioidx );

View File

@ -653,11 +653,12 @@ static int isapnpbus_probe ( struct root_device *rootdev ) {
/* Allocate struct isapnp_device */
if ( ! isapnp )
isapnp = zalloc ( sizeof ( *isapnp ) );
isapnp = malloc ( sizeof ( *isapnp ) );
if ( ! isapnp ) {
rc = -ENOMEM;
goto err;
}
memset ( isapnp, 0, sizeof ( *isapnp ) );
isapnp->csn = csn;
isapnp->logdev = logdev;

View File

@ -90,11 +90,12 @@ static int mcabus_probe ( struct root_device *rootdev ) {
for ( slot = 0 ; slot <= MCA_MAX_SLOT_NR ; slot++ ) {
/* Allocate struct mca_device */
if ( ! mca )
mca = zalloc ( sizeof ( *mca ) );
mca = malloc ( sizeof ( *mca ) );
if ( ! mca ) {
rc = -ENOMEM;
goto err;
}
memset ( mca, 0, sizeof ( *mca ) );
mca->slot = slot;
/* Make sure motherboard setup is off */

View File

@ -245,11 +245,12 @@ static int pcibus_probe ( struct root_device *rootdev ) {
/* Allocate struct pci_device */
if ( ! pci )
pci = zalloc ( sizeof ( *pci ) );
pci = malloc ( sizeof ( *pci ) );
if ( ! pci ) {
rc = -ENOMEM;
goto err;
}
memset ( pci, 0, sizeof ( *pci ) );
pci->bus = bus;
pci->devfn = devfn;