/* if failed, give up and free the control instance.  */
static int add_control_to_empty(struct mixer_build *state, struct snd_kcontrol *kctl)
/* if failed, give up and free the control instance.  */
static int add_control_to_empty(struct mixer_build *state, struct snd_kcontrol *kctl)
{
	struct usb_mixer_elem_info *cval = kctl->private_data;
	int err;
	while (snd_ctl_find_id(state->chip->card, &kctl->id))
		kctl->id.index++;
	if ((err = snd_ctl_add(state->chip->card, kctl)) < 0) {
		snd_printd(KERN_ERR "cannot add control (err = %d)\n", err);
		return err;
	}
	cval->elem_id = &kctl->id;
	cval->next_id_elem = state->mixer->id_elems[cval->id];
	state->mixer->id_elems[cval->id] = cval;
	return 0;
}