diff options
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) | |||
| 1051 | struct resource *res; | 1051 | struct resource *res; |
| 1052 | const u32 *pdata = pdev->dev.platform_data; | 1052 | const u32 *pdata = pdev->dev.platform_data; |
| 1053 | 1053 | ||
| 1054 | if (!pdata) { | ||
| 1055 | dev_err(&pdev->dev, "Missing platform data\n"); | ||
| 1056 | return -ENODEV; | ||
| 1057 | } | ||
| 1058 | |||
| 1054 | audio_drv_data = devm_kzalloc(&pdev->dev, sizeof(struct audio_drv_data), | 1059 | audio_drv_data = devm_kzalloc(&pdev->dev, sizeof(struct audio_drv_data), |
| 1055 | GFP_KERNEL); | 1060 | GFP_KERNEL); |
| 1056 | if (audio_drv_data == NULL) | 1061 | if (audio_drv_data == NULL) |
| @@ -1058,6 +1063,8 @@ static int acp_audio_probe(struct platform_device *pdev) | |||
| 1058 | 1063 | ||
| 1059 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 1064 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
| 1060 | audio_drv_data->acp_mmio = devm_ioremap_resource(&pdev->dev, res); | 1065 | audio_drv_data->acp_mmio = devm_ioremap_resource(&pdev->dev, res); |
| 1066 | if (IS_ERR(audio_drv_data->acp_mmio)) | ||
| 1067 | return PTR_ERR(audio_drv_data->acp_mmio); | ||
| 1061 | 1068 | ||
| 1062 | /* The following members gets populated in device 'open' | 1069 | /* The following members gets populated in device 'open' |
| 1063 | * function. Till then interrupts are disabled in 'acp_init' | 1070 | * function. Till then interrupts are disabled in 'acp_init' |
