From: Pierre-Louis Bossart Date: Thu, 3 Sep 2020 20:47:36 +0000 (+0800) Subject: soundwire: stream: fix NULL/IS_ERR confusion X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=3471d2a192bace106e4da7bcdcdd5ebcca4267d2;p=linux.git 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 Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200903204739.31206-2-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul --- diff --git a/drivers/soundwire/stream.c b/drivers/soundwire/stream.c index afb95febb0d31..b8b1973e3ee20 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; }