summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShengjiu Wang <shengjiu.wang@nxp.com>2018-07-27 10:26:09 +0800
committerDong Aisheng <aisheng.dong@nxp.com>2019-11-25 15:52:37 +0800
commit139e0453a09ff63196e7dbd06f031c41db521052 (patch)
tree1210c6f609d6f1876e2d2ace1119759f1d24c933
parent31e6c7140d66e15846124532ff435db95b15d5f2 (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>
-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;
}