diff options
author | Jiasheng Jiang <jiasheng@iscas.ac.cn> | 2022-01-07 05:08:51 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2022-01-07 10:25:32 +0300 |
commit | 1b1f98dd70dcfd25476adabcbe72484312e879f7 (patch) | |
tree | 1c66c7283b7a53ca6fad4d8cbd36f77ad35cf979 /sound | |
parent | 4b46daf028e2f4a051047791b8a3bfc9bc37d684 (diff) | |
download | linux-1b1f98dd70dcfd25476adabcbe72484312e879f7.tar.xz |
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 <jiasheng@iscas.ac.cn>
Link: https://lore.kernel.org/r/20220107020851.3095591-1-jiasheng@iscas.ac.cn
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/x86/intel_hdmi_audio.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/x86/intel_hdmi_audio.c b/sound/x86/intel_hdmi_audio.c index 378826312abe..1c94eaff1931 100644 --- a/sound/x86/intel_hdmi_audio.c +++ b/sound/x86/intel_hdmi_audio.c @@ -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) + return ret; init_channel_allocations(); |