rem: TRACE("found %d cards\n", cards);
context: init_driver(void){	struct pci_info *item;	int index;	int cards;#ifdef DEBUG		set_dprintf_enabled(true);	load_driver_symbols("ipro1000");#endif		dprintf(INFO1"\n");	dprintf(INFO2"\n");	dprintf(INFO3"\n");		item = (pci_info *)malloc(sizeof(pci_info));	if (!item)		return B_NO_MEMORY;		if (get_module(B_PCI_MODULE_NAME, (module_info **)&gPci) < B_OK) {		free(item);		return B_ERROR;	}		for (cards = 0, index = 0; gPci->get_nth_pci_info(index++, item) == B_OK; ) {		const char *info = identify_device(item);		if (info) {			char name[64];			sprintf(name, "net/ipro1000/%d", cards);			PRINT("/dev/%s is a %s\n", name, info);			gDevList[cards] = item;			gDevNameList[cards] = strdup(name);			gDevNameList[cards + 1] = NULL;			cards++;			item = (pci_info *)malloc(sizeof(pci_info));			if (!item)				goto err_outofmem;			if (cards == MAX_CARDS)				break;		}	}		TRACE("found %d cards\n", cards);	free(item);	if (!cards)		goto err_cards;			if (initialize_timer() != B_OK) {		ERROR("timer init failed\n");		goto err_timer;	}	if (mempool_init(cards * 768) != B_OK) {		ERROR("mempool init failed\n");		goto err_mempool;	}		return B_OK;err_mempool:	terminate_timer();err_timer:err_cards:err_outofmem:	for (index = 0; index < cards; index++) {		free(gDevList[index]);		free(gDevNameList[index]);	}	put_module(B_PCI_MODULE_NAME);	return B_ERROR;}