]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: simple-card-utils: test memory allocation
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Wed, 20 Mar 2019 04:57:02 +0000 (13:57 +0900)
committerMark Brown <broonie@kernel.org>
Thu, 21 Mar 2019 14:58:01 +0000 (14:58 +0000)
commit038f16c6ef5e69fdcbc1018d61f660cf9375a88c
treed906b99bda62fe581b6ea59ec424a5bd08db6956
parent2f243e2966182da91718852ba1896ec84fd343a8
ASoC: simple-card-utils: test memory allocation

li->conf will be 0 if it was not DPCM case.
Then, 1) we shouldn't call devm_kcalloc() with size 0,
2) we need NULL pointer check if li->conf was not 0.
This patch fixed above issues.
Special thanks to Pierre-Louis Bossart

Reported-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/generic/simple-card-utils.c