Skip to content
Commit 50d4a790 authored by Philipp Zabel's avatar Philipp Zabel Committed by Mark Brown
Browse files

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: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent a8b22c1c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment