Browse Source

convert to zalloc

tags/v0.9.3
Holger Lubitz 17 years ago
parent
commit
5ce16b03a1
1 changed files with 1 additions and 2 deletions
  1. 1
    2
      src/drivers/bus/pci.c

+ 1
- 2
src/drivers/bus/pci.c View File

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

Loading…
Cancel
Save