summaryrefslogtreecommitdiffstats
path: root/drivers/soundwire/stream.c
diff options
context:
space:
mode:
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>2020-09-03 22:47:36 +0200
committerVinod Koul <vkoul@kernel.org>2020-09-04 11:21:12 +0200
commit3471d2a192bace106e4da7bcdcdd5ebcca4267d2 (patch)
tree12c434e9ea293644e799693792d2747fdb18a543 /drivers/soundwire/stream.c
parentsoundwire: remove SDW_REG_SHIFT() (diff)
downloadlinux-3471d2a192bace106e4da7bcdcdd5ebcca4267d2.tar.xz
linux-3471d2a192bace106e4da7bcdcdd5ebcca4267d2.zip
soundwire: stream: fix NULL/IS_ERR confusion
snd_soc_dai_get_sdw_stream() can only return -ENOTSUPP or the stream, NULL is not a possible value. Fixes: 4550569bd779f ('soundwire: stream: add helper to startup/shutdown streams') Reported-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20200903204739.31206-2-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/soundwire/stream.c')
-rw-r--r--drivers/soundwire/stream.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/soundwire/stream.c b/drivers/soundwire/stream.c
index afb95febb0d3..b8b1973e3ee2 100644
--- a/drivers/soundwire/stream.c
+++ b/drivers/soundwire/stream.c
@@ -1911,7 +1911,7 @@ void sdw_shutdown_stream(void *sdw_substream)
sdw_stream = snd_soc_dai_get_sdw_stream(dai, substream->stream);
- if (!sdw_stream) {
+ if (IS_ERR(sdw_stream)) {
dev_err(rtd->dev, "no stream found for DAI %s", dai->name);
return;
}