linux/sound/soc/sh/rcar
Andrzej Hajda e5d9cfc6f5 ASoC: rsnd: fix usrcnt decrementing bug
Field usrcnt is unsigned so it cannot be lesser than zero.
The patch fixes the check, moves it to the beginning of the function
and changes return value to -EIO in case of usercnt error.

The problem has been detected using proposed semantic patch
scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1].

[1]: http://permalink.gmane.org/gmane.linux.kernel/2038576

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-12-30 17:13:20 +00:00
..
adg.c ASoC: rsnd: don't use normal *mod in adg.c 2015-11-30 18:11:23 +00:00
cmd.c ASoC: rsnd: tidyup data align position for capture 2015-12-08 12:47:46 +00:00
core.c ASoC: rsnd: add Multi channel support 2015-12-22 23:58:28 +00:00
ctu.c rcar: ctu: Avoid use of ret uninitialised 2015-12-15 17:47:53 +00:00
dma.c ASoC: rsnd: tidyup debug print position on rsnd_dma_attach() 2015-12-18 12:10:56 +00:00
dvc.c ASoC: rsnd: tidyup rsnd_get_slot_xxx() naming 2015-12-18 12:10:56 +00:00
gen.c ASoC: rsnd: add Multi channel support 2015-12-22 23:58:28 +00:00
Makefile ASoC: rsnd: use mod base common method on SSIU 2015-11-16 10:09:29 +00:00
mix.c rcar: mux: Avoid use of ret uninitialised 2015-12-15 17:47:54 +00:00
rsnd.h ASoC: rsnd: add Multi channel support 2015-12-22 23:58:28 +00:00
rsrc-card.c ASoC: rsrc-card: tidyup dai format for DPCM 2015-12-17 12:14:31 +00:00
src.c ASoC: rsnd: src: add rsnd_src_halt() 2015-11-30 18:11:23 +00:00
ssi.c ASoC: rsnd: fix usrcnt decrementing bug 2015-12-30 17:13:20 +00:00
ssiu.c ASoC: rsnd: add Multi channel support 2015-12-22 23:58:28 +00:00