error_kfree: kfree(dev->queues);  
int aac_rkt_init(struct aac_dev *dev){	unsigned long start;	unsigned long status;	int instance;	const char * name;	instance = dev->id;	name     = dev->name;	/*	 *	Map in the registers from the adapter.	 */	if((dev->regs.rkt = ioremap((unsigned long)dev->scsi_host_ptr->base, 8192))==NULL)	{			printk(KERN_WARNING "aacraid: unable to map i960.\n" );		goto error_iounmap;	}	/*	 *	Check to see if the board failed any self tests.	 */	if (rkt_readl(dev, MUnit.OMRx[0]) & SELF_TEST_FAILED) {		printk(KERN_ERR "%s%d: adapter self-test failed.\n", dev->name, instance);		goto error_iounmap;	}	/*	 *	Check to see if the monitor panic'd while booting.	 */	if (rkt_readl(dev, MUnit.OMRx[0]) & MONITOR_PANIC) {		printk(KERN_ERR "%s%d: adapter monitor panic.\n", dev->name, instance);		goto error_iounmap;	}	/*	 *	Check to see if the board panic'd while booting.	 */	if (rkt_readl(dev, MUnit.OMRx[0]) & KERNEL_PANIC) {		printk(KERN_ERR "%s%d: adapter kernel panic'd.\n", dev->name, instance);		goto error_iounmap;	}	start = jiffies;	/*	 *	Wait for the adapter to be up and running. Wait up to 3 minutes	 */	while (!(rkt_readl(dev, MUnit.OMRx[0]) & KERNEL_UP_AND_RUNNING))	{		if(time_after(jiffies, start+180*HZ))		{			status = rkt_readl(dev, MUnit.OMRx[0]);			printk(KERN_ERR "%s%d: adapter kernel failed to start, init status = %lx.\n", 					dev->name, instance, status);			goto error_iounmap;		}		set_current_state(TASK_UNINTERRUPTIBLE);		schedule_timeout(1);	}	if (request_irq(dev->scsi_host_ptr->irq, aac_rkt_intr, SA_SHIRQ|SA_INTERRUPT, "aacraid", (void *)dev)<0) 	{		printk(KERN_ERR "%s%d: Interrupt unavailable.\n", name, instance);		goto error_iounmap;	}	/*	 *	Fill in the function dispatch table.	 */	dev->a_ops.adapter_interrupt = aac_rkt_interrupt_adapter;	dev->a_ops.adapter_disable_int = aac_rkt_disable_interrupt;	dev->a_ops.adapter_notify = aac_rkt_notify_adapter;	dev->a_ops.adapter_sync_cmd = rkt_sync_cmd;	dev->a_ops.adapter_check_health = aac_rkt_check_health;	/*	 *	First clear out all interrupts.  Then enable the one's that we	 *	can handle.	 */	rkt_writeb(dev, MUnit.OIMR, 0xff);	rkt_writel(dev, MUnit.ODR, 0xffffffff);	rkt_writeb(dev, MUnit.OIMR, dev->OIMR = 0xfb);	if (aac_init_adapter(dev) == NULL)		goto error_irq;	/*	 *	Start any kernel threads needed	 */	dev->thread_pid = kernel_thread((int (*)(void *))aac_command_thread, dev, 0);	if(dev->thread_pid < 0)	{		printk(KERN_ERR "aacraid: Unable to create rkt thread.\n");		goto error_kfree;	}		/*	 *	Tell the adapter that all is configured, and it can start	 *	accepting requests	 */	aac_rkt_start_adapter(dev);	return 0;error_kfree:	kfree(dev->queues);error_irq:	rkt_writeb(dev, MUnit.OIMR, dev->OIMR = 0xff);	free_irq(dev->scsi_host_ptr->irq, (void *)dev);error_iounmap:	iounmap(dev->regs.rkt);	return -1;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/8e0c5ebde82b08f6d996e11983890fc4cc085fab/rkt.c/buggy/drivers/scsi/aacraid/rkt.c