From: Pierre-Louis Bossart Date: Thu, 3 Sep 2020 20:47:37 +0000 (+0800) Subject: soundwire: intel: fix NULL/ERR_PTR confusion X-Git-Tag: v5.10.7~1418^2~82^2~27 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=06dcb4e443643db93b286f861133785ca46f5a19;p=platform%2Fkernel%2Flinux-rpi.git soundwire: intel: fix NULL/ERR_PTR confusion 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 Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200903204739.31206-3-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul --- diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c index 8a958b6..669c8af 100644 --- a/drivers/soundwire/intel.c +++ b/drivers/soundwire/intel.c @@ -1126,7 +1126,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; }