device = tgt_device_find(target, cmnd->dev_id);
if (!device) cmnd->device = device = tgt_device_find(target, cmnd->dev_id);
static void queuecommand(void *data){	int err = 0;	struct tgt_cmnd *cmnd = data;	struct tgt_target *target = cmnd->session->target;	struct tgt_device *device;	dprintk("cid %llu rw %d\n", cmnd->cid, cmnd->rw);	/* Should we do this earlier? */	device = tgt_device_find(target, cmnd->dev_id);	if (device)		dprintk("found %llu\n", cmnd->dev_id);	if (cmnd->rw == READ || cmnd->rw == WRITE)		err = device->dt->queue_cmnd(device, cmnd);	else {		/*		 * TODO: if we fail to get the command to userspace there		 * will be no setup sense buffer below so we need to add		 * something.		 */		err = uspace_cmnd_send(cmnd);		if (err >= 0)			/* sent to userspace */			return;	}	/* kspace command failure or failed to send commands to space. */	if (unlikely(err))		eprintk("failed cmnd %llu %d %d\n", cmnd->cid, err, cmnd->rw);	cmnd_done(cmnd, err);}