ASoC: Intel: sof-rt5682: fix kernel memory allocation flag

In "sof_audio_probe", we should use GFP_KERNEL instead of GFP_ATOMIC
for memory allocation because the device can sleep.

Signed-off-by: Xun Zhang <xun2.zhang@intel.com>
This commit is contained in:
Xun Zhang 2019-06-18 15:17:18 +08:00 committed by Pierre Bossart
parent 26c2aa7583
commit 08d3631c44

View File

@ -551,7 +551,7 @@ static int sof_audio_probe(struct platform_device *pdev)
int dmic_be_num, hdmi_num;
int ret, ssp_amp, ssp_codec;
ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_ATOMIC);
ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL);
if (!ctx)
return -ENOMEM;