]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: imx-sgtl5000: Fix uninitialized pointer use in error path
authorPhilipp Zabel <p.zabel@pengutronix.de>
Wed, 25 Sep 2013 13:22:01 +0000 (15:22 +0200)
committerMark Brown <broonie@linaro.org>
Thu, 26 Sep 2013 11:01:32 +0000 (12:01 +0100)
commit99607260b5fa0e935a77a291a52752e4fce08c74
tree7b036ab65805090e553758edd1f82851ec306cb9
parentcba32037e8faf7cfa726268936e16da2fbda6bb8
ASoC: imx-sgtl5000: Fix uninitialized pointer use in error path

This patch avoids to dereference the uninitialized data pointer if the
error path is entered before devm_kzalloc is called (or if the allocation
fails). It fixes the following warning:

    sound/soc/fsl/imx-sgtl5000.c: In function 'imx_sgtl5000_probe':
    sound/soc/fsl/imx-sgtl5000.c:175:18: warning: 'data' may be used uninitialized in this function [-Wmaybe-uninitialized]

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/fsl/imx-sgtl5000.c