Skip to content

Commit 4a738a9

Browse files
plbossartgregkh
authored andcommitted
soundwire: intel: fix NULL/ERR_PTR confusion
[ Upstream commit 06dcb4e ] 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: 0955314 ('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>
1 parent 5ab6a76 commit 4a738a9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/soundwire/intel.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1011,7 +1011,7 @@ static void *intel_get_sdw_stream(struct snd_soc_dai *dai,
10111011
dma = dai->capture_dma_data;
10121012

10131013
if (!dma)
1014-
return NULL;
1014+
return ERR_PTR(-EINVAL);
10151015

10161016
return dma->stream;
10171017
}

0 commit comments

Comments
 (0)