mirror of
https://github.com/xcat2/xNBA.git
synced 2024-12-14 15:21:32 +00:00
Merge branch 'zalloc'
This commit is contained in:
commit
627feee265
@ -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 );
|
||||
|
||||
|
@ -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 );
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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 */
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user