summaryrefslogtreecommitdiffstats
path: root/drivers/soundwire
diff options
context:
space:
mode:
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>2020-09-04 04:47:37 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-10-29 10:11:16 +0100
commit4a738a991168079e7ec37dc1671c1c5e23570210 (patch)
tree1820c1eee17c8fce69c720009b15322073e80c4b /drivers/soundwire
parent5ab6a769b9480e176d74558d2b501d1b4a5b3322 (diff)
downloadlinux-stable-4a738a991168079e7ec37dc1671c1c5e23570210.tar.gz
linux-stable-4a738a991168079e7ec37dc1671c1c5e23570210.tar.bz2
linux-stable-4a738a991168079e7ec37dc1671c1c5e23570210.zip
soundwire: intel: fix NULL/ERR_PTR confusion
[ Upstream commit 06dcb4e443643db93b286f861133785ca46f5a19 ] snd_soc_dai_get_sdw_stream() can only return the pointer to stream or an ERR_PTR value, NULL is not a possible value. Fixes: 09553140c8d7b ('soundwire: intel: implement get_sdw_stream() operations') 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-3-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/soundwire')
-rw-r--r--drivers/soundwire/intel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c
index a283670659a9..10ff166977f8 100644
--- a/drivers/soundwire/intel.c
+++ b/drivers/soundwire/intel.c
@@ -1011,7 +1011,7 @@ static void *intel_get_sdw_stream(struct snd_soc_dai *dai,
dma = dai->capture_dma_data;
if (!dma)
- return NULL;
+ return ERR_PTR(-EINVAL);
return dma->stream;
}