/* On success return a newly allocated copy of the channel-path description data associated with the given channel-path ID. Return NULL on error.  */
void* chp_get_chp_desc(struct chp_id chpid)
/* On success return a newly allocated copy of the channel-path description data associated with the given channel-path ID. Return NULL on error.  */
void* chp_get_chp_desc(struct chp_id chpid)
{
	struct channel_path *chp;
	struct channel_path_desc *desc;
	chp = chpid_to_chp(chpid);
	if (!chp)
		return NULL;
	desc = kmalloc(sizeof(struct channel_path_desc), GFP_KERNEL);
	if (!desc)
		return NULL;
	memcpy(desc, &chp->desc, sizeof(struct channel_path_desc));
	return desc;
}