diff options
author | Stefan Agner <stefan@agner.ch> | 2019-01-16 16:57:17 +0100 |
---|---|---|
committer | Stefan Agner <stefan.agner@toradex.com> | 2019-04-25 18:06:51 +0200 |
commit | 33a38f590703d0908b3628d656a89b9954b0bf56 (patch) | |
tree | 051f9512b2b46214c8646323ef0aa0986e2af595 /sound/soc/fsl | |
parent | ef616bc3026d4e39bc34034a71c13ab7b857cce9 (diff) |
ASoC: imx-sgtl5000: put of nodes if finding codec fails
Make sure to properly put the of node in case finding the codec
fails.
Fixes: 81e8e4926167 ("ASoC: fsl: add sgtl5000 clock support for imx-sgtl5000")
Signed-off-by: Stefan Agner <stefan@agner.ch>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Diffstat (limited to 'sound/soc/fsl')
-rw-r--r-- | sound/soc/fsl/imx-sgtl5000.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/soc/fsl/imx-sgtl5000.c b/sound/soc/fsl/imx-sgtl5000.c index 9b9a7ec52905..4bd8da3a5f5b 100644 --- a/sound/soc/fsl/imx-sgtl5000.c +++ b/sound/soc/fsl/imx-sgtl5000.c @@ -112,7 +112,8 @@ static int imx_sgtl5000_probe(struct platform_device *pdev) codec_dev = of_find_i2c_device_by_node(codec_np); if (!codec_dev) { dev_err(&pdev->dev, "failed to find codec platform device\n"); - return -EPROBE_DEFER; + ret = -EPROBE_DEFER; + goto fail; } data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL); |