Skip to content

Commit

Permalink
ALSA: intel_hdmi: Check for error num after setting mask
Browse files Browse the repository at this point in the history
To maintain the consistency of the code, it should be better to add the
sanity check after calling dma_set_mask_and_coherent(), like
tegra_pcm_dma_allocate() in `sound/soc/tegra/tegra_pcm.c`.

Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
  • Loading branch information
JiangJias authored and intel-lab-lkp committed Jan 6, 2022
1 parent b81e9e5 commit fa85305
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sound/x86/intel_hdmi_audio.c
Expand Up @@ -1750,7 +1750,9 @@ static int hdmi_lpe_audio_probe(struct platform_device *pdev)
card_ctx->irq = irq;

/* only 32bit addressable */
dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
if (ret)
goto err;

init_channel_allocations();

Expand Down

0 comments on commit fa85305

Please sign in to comment.