summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorShengjiu Wang <shengjiu.wang@nxp.com>2018-07-27 10:26:09 +0800
committerLeonard Crestez <leonard.crestez@nxp.com>2018-08-24 12:41:33 +0300
commitf08c2e3811f0f1b3e4e782da20533d75b3bdf1e7 (patch)
treef10cca18863c5b9aae5e7034ba1a5a44086b8190 /sound
parentc33d119b9c67432aa978b44a1f169bb188076145 (diff)
MLK-19063: ASoC: fsl_hdmi: fix null pointer dereference issue
This issue is reported by coverity (4022712). Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/fsl/fsl_hdmi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/fsl/fsl_hdmi.c b/sound/soc/fsl/fsl_hdmi.c
index 0a0fafc360c9..05e9a7c1c1d9 100644
--- a/sound/soc/fsl/fsl_hdmi.c
+++ b/sound/soc/fsl/fsl_hdmi.c
@@ -692,8 +692,8 @@ static int fsl_hdmi_dai_probe(struct platform_device *pdev)
}
hdmi_data->dma_dev = platform_device_alloc("imx-hdmi-audio", -1);
- if (IS_ERR(hdmi_data->dma_dev)) {
- ret = PTR_ERR(hdmi_data->dma_dev);
+ if (!hdmi_data->dma_dev) {
+ ret = -ENOMEM;
goto fail_dma;
}