ctx = ib_ucm_ctx_get(cmd.id); if (!ctx) { result = -ENOENT; goto done; } 
ctx = ib_ucm_ctx_get(file, cmd.id); if (!IS_ERR(ctx)) { result = func(ctx->cm_id, cmd.status, info, cmd.info_len, data, cmd.data_len); ib_ucm_ctx_put(ctx); } else result = PTR_ERR(ctx); 
static ssize_t ib_ucm_send_info(struct ib_ucm_file *file,				const char __user *inbuf, int in_len,				int (*func)(struct ib_cm_id *cm_id,					    int status,					    const void *info,					    u8 info_len,					    const void *data,					    u8 data_len)){	struct ib_ucm_context *ctx;	struct ib_ucm_info cmd;	const void *data = NULL;	const void *info = NULL;	int result;	if (copy_from_user(&cmd, inbuf, sizeof(cmd)))		return -EFAULT;	result = ib_ucm_alloc_data(&data, cmd.data, cmd.data_len);	if (result)		goto done;	result = ib_ucm_alloc_data(&info, cmd.info, cmd.info_len);	if (result)		goto done;	ctx = ib_ucm_ctx_get(cmd.id);	if (!ctx) {		result = -ENOENT;		goto done;	} 	down(&ctx->file->mutex);	if (ctx->file != file)		result = -EINVAL;	else		result = func(ctx->cm_id, cmd.status,			      info, cmd.info_len,			      data, cmd.data_len);	up(&ctx->file->mutex);	ib_ucm_ctx_put(ctx); /* func reference */done:	kfree(data);	kfree(info);	return result;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/b9ef520f9caf20aba8ac7cb2bbba45b52ff19d53/ucm.c/clean/drivers/infiniband/core/ucm.c