ASoC: sn95031: Fix the logic to find free channel
authorAxel Lin <axel.lin@gmail.com>
Sat, 3 Sep 2011 05:41:47 +0000 (13:41 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Sun, 4 Sep 2011 15:53:39 +0000 (08:53 -0700)
In the case of no free channel available,
current implementation returns 0 instead of negative errno.

This patch fixes the logic to return -EINVAL if no free channel available.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Vinod Koul <vinod.koul@linux.intel.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

No differences found