ソースを参照

Merge branch 'zalloc'

tags/v0.9.3
Michael Brown 17年前
コミット
627feee265
5個のファイルの変更10行の追加5行の削除
  1. 2
    1
      src/drivers/bus/eisa.c
  2. 2
    1
      src/drivers/bus/isa.c
  3. 2
    1
      src/drivers/bus/isapnp.c
  4. 2
    1
      src/drivers/bus/mca.c
  5. 2
    1
      src/drivers/bus/pci.c

+ 2
- 1
src/drivers/bus/eisa.c ファイルの表示

@@ -106,11 +106,12 @@ static int eisabus_probe ( struct root_device *rootdev ) {
106 106
 	for ( slot = EISA_MIN_SLOT ; slot <= EISA_MAX_SLOT ; slot++ ) {
107 107
 		/* Allocate struct eisa_device */
108 108
 		if ( ! eisa )
109
-			eisa = zalloc ( sizeof ( *eisa ) );
109
+			eisa = malloc ( sizeof ( *eisa ) );
110 110
 		if ( ! eisa ) {
111 111
 			rc = -ENOMEM;
112 112
 			goto err;
113 113
 		}
114
+		memset ( eisa, 0, sizeof ( *eisa ) );
114 115
 		eisa->slot = slot;
115 116
 		eisa->ioaddr = EISA_SLOT_BASE ( eisa->slot );
116 117
 

+ 2
- 1
src/drivers/bus/isa.c ファイルの表示

@@ -105,11 +105,12 @@ static int isabus_probe ( struct root_device *rootdev ) {
105 105
 		      ioidx <= ISA_IOIDX_MAX ( driver ) ; ioidx++ ) {
106 106
 			/* Allocate struct isa_device */
107 107
 			if ( ! isa )
108
-				isa = zalloc ( sizeof ( *isa ) );
108
+				isa = malloc ( sizeof ( *isa ) );
109 109
 			if ( ! isa ) {
110 110
 				rc = -ENOMEM;
111 111
 				goto err;
112 112
 			}
113
+			memset ( isa, 0, sizeof ( *isa ) );
113 114
 			isa->driver = driver;
114 115
 			isa->ioaddr = ISA_IOADDR ( driver, ioidx );
115 116
 

+ 2
- 1
src/drivers/bus/isapnp.c ファイルの表示

@@ -653,11 +653,12 @@ static int isapnpbus_probe ( struct root_device *rootdev ) {
653 653
 
654 654
 			/* Allocate struct isapnp_device */
655 655
 			if ( ! isapnp )
656
-				isapnp = zalloc ( sizeof ( *isapnp ) );
656
+				isapnp = malloc ( sizeof ( *isapnp ) );
657 657
 			if ( ! isapnp ) {
658 658
 				rc = -ENOMEM;
659 659
 				goto err;
660 660
 			}
661
+			memset ( isapnp, 0, sizeof ( *isapnp ) );
661 662
 			isapnp->csn = csn;
662 663
 			isapnp->logdev = logdev;
663 664
 

+ 2
- 1
src/drivers/bus/mca.c ファイルの表示

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

+ 2
- 1
src/drivers/bus/pci.c ファイルの表示

@@ -245,11 +245,12 @@ static int pcibus_probe ( struct root_device *rootdev ) {
245 245
 
246 246
 			/* Allocate struct pci_device */
247 247
 			if ( ! pci )
248
-				pci = zalloc ( sizeof ( *pci ) );
248
+				pci = malloc ( sizeof ( *pci ) );
249 249
 			if ( ! pci ) {
250 250
 				rc = -ENOMEM;
251 251
 				goto err;
252 252
 			}
253
+			memset ( pci, 0, sizeof ( *pci ) );
253 254
 			pci->bus = bus;
254 255
 			pci->devfn = devfn;
255 256
 			

読み込み中…
キャンセル
保存