diff mbox series

[01/13] ASoC: codecs: cs42l42-sdw: clear stream

Message ID 20230324014408.1677505-2-yung-chuan.liao@linux.intel.com
State New
Headers show
Series ASoC: SoundWire codecs: simplify/fix set_stream | expand

Commit Message

Liao, Bard March 24, 2023, 1:43 a.m. UTC
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

The API requires the stream info to be cleared when the argument is
NULL.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
---
 sound/soc/codecs/cs42l42-sdw.c | 3 ---
 1 file changed, 3 deletions(-)
diff mbox series

Patch

diff --git a/sound/soc/codecs/cs42l42-sdw.c b/sound/soc/codecs/cs42l42-sdw.c
index 7b539ee55499..eeab07c850f9 100644
--- a/sound/soc/codecs/cs42l42-sdw.c
+++ b/sound/soc/codecs/cs42l42-sdw.c
@@ -152,9 +152,6 @@  static int cs42l42_sdw_port_prep(struct sdw_slave *slave,
 static int cs42l42_sdw_dai_set_sdw_stream(struct snd_soc_dai *dai, void *sdw_stream,
 					  int direction)
 {
-	if (!sdw_stream)
-		return 0;
-
 	snd_soc_dai_dma_data_set(dai, direction, sdw_stream);
 
 	return 0;