Skip to content

Commit 5ab6a76

Browse files
plbossartgregkh
authored andcommitted
soundwire: stream: fix NULL/IS_ERR confusion
[ Upstream commit 3471d2a ] snd_soc_dai_get_sdw_stream() can only return -ENOTSUPP or the stream, NULL is not a possible value. Fixes: 4550569 ('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> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 76d2e56 commit 5ab6a76

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/soundwire/stream.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1913,7 +1913,7 @@ void sdw_shutdown_stream(void *sdw_substream)
19131913

19141914
sdw_stream = snd_soc_dai_get_sdw_stream(dai, substream->stream);
19151915

1916-
if (!sdw_stream) {
1916+
if (IS_ERR(sdw_stream)) {
19171917
dev_err(rtd->dev, "no stream found for DAI %s", dai->name);
19181918
return;
19191919
}

0 commit comments

Comments
 (0)