memset(pd, 0, sizeof(struct pktcdvd_device)); 
static int pkt_setup_dev(struct pkt_ctrl_command *ctrl_cmd){	int idx;	int ret = -ENOMEM;	struct pktcdvd_device *pd;	struct gendisk *disk;	dev_t dev = new_decode_dev(ctrl_cmd->dev);	for (idx = 0; idx < MAX_WRITERS; idx++)		if (!pkt_devs[idx])			break;	if (idx == MAX_WRITERS) {		printk("pktcdvd: max %d writers supported\n", MAX_WRITERS);		return -EBUSY;	}	pd = kmalloc(sizeof(struct pktcdvd_device), GFP_KERNEL);	if (!pd)		return ret;	memset(pd, 0, sizeof(struct pktcdvd_device));	pd->rb_pool = mempool_create(PKT_RB_POOL_SIZE, pkt_rb_alloc, pkt_rb_free, NULL);	if (!pd->rb_pool)		goto out_mem;	disk = alloc_disk(1);	if (!disk)		goto out_mem;	pd->disk = disk;	spin_lock_init(&pd->lock);	spin_lock_init(&pd->iosched.lock);	sprintf(pd->name, "pktcdvd%d", idx);	init_waitqueue_head(&pd->wqueue);	pd->bio_queue = RB_ROOT;	disk->major = pkt_major;	disk->first_minor = idx;	disk->fops = &pktcdvd_ops;	disk->flags = GENHD_FL_REMOVABLE;	sprintf(disk->disk_name, "pktcdvd%d", idx);	disk->private_data = pd;	disk->queue = blk_alloc_queue(GFP_KERNEL);	if (!disk->queue)		goto out_mem2;	pd->pkt_dev = MKDEV(disk->major, disk->first_minor);	ret = pkt_new_dev(pd, dev);	if (ret)		goto out_new_dev;	add_disk(disk);	pkt_devs[idx] = pd;	ctrl_cmd->pkt_dev = new_encode_dev(pd->pkt_dev);	return 0;out_new_dev:	blk_put_queue(disk->queue);out_mem2:	put_disk(disk);out_mem:	if (pd->rb_pool)		mempool_destroy(pd->rb_pool);	kfree(pd);	return ret;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/1107d2e0352769b9bde6a4877c295b9309cdb877/pktcdvd.c/clean/drivers/block/pktcdvd.c