From a772dc4a2a309e13d2b59471a4d0d16ed59e6fe0 Mon Sep 17 00:00:00 2001 From: Holger Lubitz Date: Sat, 7 Jul 2007 01:55:23 +0200 Subject: [PATCH 1/5] Revert "convert to zalloc" This reverts commit 5ce16b03a1cb036ad0ab818473fe8f9c158949ed. --- src/drivers/bus/pci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/drivers/bus/pci.c b/src/drivers/bus/pci.c index 1f0ad521..967441ac 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; From 50fe2159d5533a11e51341c64de61aabff934eb4 Mon Sep 17 00:00:00 2001 From: Holger Lubitz Date: Sat, 7 Jul 2007 01:55:45 +0200 Subject: [PATCH 2/5] Revert "convert to zalloc" This reverts commit 7297f04481f6737b0a40161da6d8413ca0f478d2. --- src/drivers/bus/mca.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/drivers/bus/mca.c b/src/drivers/bus/mca.c index 3f442111..375a6834 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 */ From ac323c5e4dee9841b72df9012b181583429167b1 Mon Sep 17 00:00:00 2001 From: Holger Lubitz Date: Sat, 7 Jul 2007 01:56:15 +0200 Subject: [PATCH 3/5] Revert "convert to zalloc" This reverts commit 636bd2cd0abfd9ae774456cd1c00e3f8bb63e7d8. --- src/drivers/bus/isapnp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/drivers/bus/isapnp.c b/src/drivers/bus/isapnp.c index a19beb80..7903208d 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; From e3c72a3438b838bf20cc57517b08687dfd6a02bc Mon Sep 17 00:00:00 2001 From: Holger Lubitz Date: Sat, 7 Jul 2007 01:56:27 +0200 Subject: [PATCH 4/5] Revert "convert to zalloc" This reverts commit 3414fd8df8c514947254fd065d407e8db115221f. --- src/drivers/bus/isa.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/drivers/bus/isa.c b/src/drivers/bus/isa.c index edcf05bb..a4105fd0 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 ); From 85e04b5837c5e3320b8b8b0cbb45ed6f27073842 Mon Sep 17 00:00:00 2001 From: Holger Lubitz Date: Sat, 7 Jul 2007 01:56:37 +0200 Subject: [PATCH 5/5] Revert "convert to zalloc" This reverts commit a4bea78974620820774a59f49646eafbdb481148. --- src/drivers/bus/eisa.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/drivers/bus/eisa.c b/src/drivers/bus/eisa.c index eed99ffe..d9d02d72 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 );