diff options
author | Ingo Molnar <mingo@kernel.org> | 2018-01-06 12:07:10 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2018-01-06 12:07:10 +0100 |
commit | b6815f354518591400ce4c3a5fd63337643710ff (patch) | |
tree | 14f8a117b4556f7dba5a5a9ccebc5e3b204cbd56 /sound/soc/amd/acp-pcm-dma.c | |
parent | a0a8f2ada3f50f0190ebcbb60e77e697444c470e (diff) | |
parent | 89876f275e8d562912d9c238cd888b52065cf25c (diff) | |
download | linux-b6815f354518591400ce4c3a5fd63337643710ff.tar.bz2 |
Merge branch 'linus' into perf/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'sound/soc/amd/acp-pcm-dma.c')
-rw-r--r-- | sound/soc/amd/acp-pcm-dma.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sound/soc/amd/acp-pcm-dma.c b/sound/soc/amd/acp-pcm-dma.c index 9f521a55d610..b5e41df6bb3a 100644 --- a/sound/soc/amd/acp-pcm-dma.c +++ b/sound/soc/amd/acp-pcm-dma.c @@ -1051,6 +1051,11 @@ static int acp_audio_probe(struct platform_device *pdev) struct resource *res; const u32 *pdata = pdev->dev.platform_data; + if (!pdata) { + dev_err(&pdev->dev, "Missing platform data\n"); + return -ENODEV; + } + audio_drv_data = devm_kzalloc(&pdev->dev, sizeof(struct audio_drv_data), GFP_KERNEL); if (audio_drv_data == NULL) @@ -1058,6 +1063,8 @@ static int acp_audio_probe(struct platform_device *pdev) res = platform_get_resource(pdev, IORESOURCE_MEM, 0); audio_drv_data->acp_mmio = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(audio_drv_data->acp_mmio)) + return PTR_ERR(audio_drv_data->acp_mmio); /* The following members gets populated in device 'open' * function. Till then interrupts are disabled in 'acp_init' |