if (pc) kfree (pc); if (rq) kfree (rq); 
kfree (pc); kfree (rq); 
static int idescsi_queue (struct scsi_cmnd *cmd,		void (*done)(struct scsi_cmnd *)){	struct Scsi_Host *host = cmd->device->host;	idescsi_scsi_t *scsi = scsihost_to_idescsi(host);	ide_drive_t *drive = scsi->drive;	struct request *rq = NULL;	idescsi_pc_t *pc = NULL;	if (!drive) {		scmd_printk (KERN_ERR, cmd, "drive not present\n");		goto abort;	}	scsi = drive_to_idescsi(drive);	pc = kmalloc (sizeof (idescsi_pc_t), GFP_ATOMIC);	rq = kmalloc (sizeof (struct request), GFP_ATOMIC);	if (rq == NULL || pc == NULL) {		printk (KERN_ERR "ide-scsi: %s: out of memory\n", drive->name);		goto abort;	}	memset (pc->c, 0, 12);	pc->flags = 0;	pc->rq = rq;	memcpy (pc->c, cmd->cmnd, cmd->cmd_len);	if (cmd->use_sg) {		pc->buffer = NULL;		pc->sg = cmd->request_buffer;	} else {		pc->buffer = cmd->request_buffer;		pc->sg = NULL;	}	pc->b_count = 0;	pc->request_transfer = pc->buffer_size = cmd->request_bufflen;	pc->scsi_cmd = cmd;	pc->done = done;	pc->timeout = jiffies + cmd->timeout_per_command;	if (should_transform(drive, cmd))		set_bit(PC_TRANSFORM, &pc->flags);	idescsi_transform_pc1 (drive, pc);	if (test_bit(IDESCSI_LOG_CMD, &scsi->log)) {		printk ("ide-scsi: %s: que %lu, cmd = ", drive->name, cmd->serial_number);		hexdump(cmd->cmnd, cmd->cmd_len);		if (memcmp(pc->c, cmd->cmnd, cmd->cmd_len)) {			printk ("ide-scsi: %s: que %lu, tsl = ", drive->name, cmd->serial_number);			hexdump(pc->c, 12);		}	}	ide_init_drive_cmd (rq);	rq->special = (char *) pc;	rq->flags = REQ_SPECIAL;	spin_unlock_irq(host->host_lock);	rq->rq_disk = scsi->disk;	(void) ide_do_drive_cmd (drive, rq, ide_end);	spin_lock_irq(host->host_lock);	return 0;abort:	if (pc) kfree (pc);	if (rq) kfree (rq);	cmd->result = DID_ERROR << 16;	done(cmd);	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/c9475cb0c358ff0dd473544280d92482df491913/ide-scsi.c/clean/drivers/scsi/ide-scsi.c