* [PATCH v3] ALSA: intel_hdmi: Check for error num after setting mask
@ 2022-01-07 2:08 Jiasheng Jiang
2022-01-07 7:26 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Jiasheng Jiang @ 2022-01-07 2:08 UTC (permalink / raw)
To: tiwai
Cc: perex, tiwai, leon, broonie, joe, alsa-devel, linux-kernel,
Jiasheng Jiang
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>
---
Changelog
v2 -> v3
* Change 1. Remove the fixes tag and change the message.
* Change 2. Correct the patch to fit the lastest code.
---
sound/x86/intel_hdmi_audio.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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();
--
2.25.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v3] ALSA: intel_hdmi: Check for error num after setting mask
2022-01-07 2:08 [PATCH v3] ALSA: intel_hdmi: Check for error num after setting mask Jiasheng Jiang
@ 2022-01-07 7:26 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2022-01-07 7:26 UTC (permalink / raw)
To: Jiasheng Jiang; +Cc: perex, tiwai, leon, broonie, joe, alsa-devel, linux-kernel
On Fri, 07 Jan 2022 03:08:51 +0100,
Jiasheng Jiang wrote:
>
> 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>
Thanks, applied now.
Takashi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-01-07 7:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-07 2:08 [PATCH v3] ALSA: intel_hdmi: Check for error num after setting mask Jiasheng Jiang
2022-01-07 7:26 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®