[alsa-devel] [ASoC] bug in soc_pcm_open

Matthieu CASTET matthieu.castet at parrot.com
Mon Jun 11 17:02:54 CEST 2007


Hi,

it seems there is a bug in soc_pcm_open. In some case [1] we are in a error
path, but we don't set the ret return value.

This cause bug/crash from alsa core.

Thanks

Matthieu



[1]http://hg-mirror.alsa-project.org/alsa-kernel/file/38926de0e79c/soc/soc-core.c
if (!runtime->hw.rates) {

      218 		printk(KERN_ERR "asoc: %s <-> %s No matching rates\n",

      219 			codec_dai->name, cpu_dai->name);

      220 		goto machine_err;

      221 	}

      222 	if (!runtime->hw.formats) {

      223 		printk(KERN_ERR "asoc: %s <-> %s No matching formats\n",

      224 			codec_dai->name, cpu_dai->name);

      225 		goto machine_err;

      226 	}

      227 	if (!runtime->hw.channels_min || !runtime->hw.channels_max) {

      228 		printk(KERN_ERR "asoc: %s <-> %s No matching channels\n",

      229 			codec_dai->name, cpu_dai->name);

      230 		goto machine_err;

      231 	}




More information about the Alsa-devel mailing list