Skip to content

Commit 1b1f98d

Browse files
JiangJiastiwai
authored andcommitted
ALSA: intel_hdmi: Check for error num after setting mask
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent 4b46daf commit 1b1f98d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sound/x86/intel_hdmi_audio.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1750,7 +1750,9 @@ static int hdmi_lpe_audio_probe(struct platform_device *pdev)
17501750
card_ctx->irq = irq;
17511751

17521752
/* only 32bit addressable */
1753-
dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
1753+
ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
1754+
if (ret)
1755+
return ret;
17541756

17551757
init_channel_allocations();
17561758

0 commit comments

Comments
 (0)