* [PATCH] ASoC: intel: skylake: Add check for dma_set_max_seg_size
@ 2024-04-29 4:23 Chen Ni
0 siblings, 0 replies; only message in thread
From: Chen Ni @ 2024-04-29 4:23 UTC (permalink / raw)
To: cezary.rojewski, pierre-louis.bossart, liam.r.girdwood,
peter.ujfalusi, yung-chuan.liao, ranjani.sridharan, kai.vehmanen,
broonie, perex, tiwai, maarten.lankhorst, amadeuszx.slawinski
Cc: alsa-devel, linux-sound, linux-kernel, Chen Ni
Add check for the return value of dma_set_max_seg_size() and return
the error if it fails in order to catch the error.
Fixes: c22a8086b384 ("ASoC: intel: skylake: Set max DMA segment size")
Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
---
sound/soc/intel/skylake/skl.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/sound/soc/intel/skylake/skl.c b/sound/soc/intel/skylake/skl.c
index 117125187793..8edc13795462 100644
--- a/sound/soc/intel/skylake/skl.c
+++ b/sound/soc/intel/skylake/skl.c
@@ -943,7 +943,9 @@ static int skl_first_init(struct hdac_bus *bus)
/* allow 64bit DMA address if supported by H/W */
if (dma_set_mask_and_coherent(bus->dev, DMA_BIT_MASK(64)))
dma_set_mask_and_coherent(bus->dev, DMA_BIT_MASK(32));
- dma_set_max_seg_size(bus->dev, UINT_MAX);
+ err = dma_set_max_seg_size(bus->dev, UINT_MAX);
+ if (err)
+ return err;
/* initialize streams */
snd_hdac_ext_stream_init_all
--
2.25.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2024-04-29 4:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-29 4:23 [PATCH] ASoC: intel: skylake: Add check for dma_set_max_seg_size Chen Ni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).