summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/drivers/bus/eisa.c3
-rw-r--r--src/drivers/bus/isa.c3
-rw-r--r--src/drivers/bus/isapnp.c3
-rw-r--r--src/drivers/bus/mca.c3
-rw-r--r--src/drivers/bus/pci.c3
5 files changed, 10 insertions, 5 deletions
diff --git a/src/drivers/bus/eisa.c b/src/drivers/bus/eisa.c
index eed99ffed..d9d02d727 100644
--- a/src/drivers/bus/eisa.c
+++ b/src/drivers/bus/eisa.c
@@ -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 );
diff --git a/src/drivers/bus/isa.c b/src/drivers/bus/isa.c
index edcf05bbf..a4105fd00 100644
--- a/src/drivers/bus/isa.c
+++ b/src/drivers/bus/isa.c
@@ -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 );
diff --git a/src/drivers/bus/isapnp.c b/src/drivers/bus/isapnp.c
index a19beb808..7903208d0 100644
--- a/src/drivers/bus/isapnp.c
+++ b/src/drivers/bus/isapnp.c
@@ -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;
diff --git a/src/drivers/bus/mca.c b/src/drivers/bus/mca.c
index 3f4421111..375a68344 100644
--- a/src/drivers/bus/mca.c
+++ b/src/drivers/bus/mca.c
@@ -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 */
diff --git a/src/drivers/bus/pci.c b/src/drivers/bus/pci.c
index 1f0ad5211..967441acd 100644
--- a/src/drivers/bus/pci.c
+++ b/src/drivers/bus/pci.c
@@ -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;