/* Returns 0 if successful, otherwise a negative error code.  */
int snd_hda_build_controls(struct hda_bus *bus)
/* Returns 0 if successful, otherwise a negative error code.  */
int snd_hda_build_controls(struct hda_bus *bus)
{
	struct hda_codec *codec;
	list_for_each_entry(codec, &bus->codec_list, list) {
		int err = snd_hda_codec_build_controls(codec);
		if (err < 0) {
			printk(KERN_ERR "hda_codec: cannot build controls"
			       "for #%d (error %d)\n", codec->addr, err); 
			err = snd_hda_codec_reset(codec);
			if (err < 0) {
				printk(KERN_ERR
				       "hda_codec: cannot revert codec\n");
				return err;
			}
		}
	}
	return 0;
}