Patch "soundwire: intel: fix NULL/ERR_PTR confusion" has been added to the 5.9-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    soundwire: intel: fix NULL/ERR_PTR confusion

to the 5.9-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     soundwire-intel-fix-null-err_ptr-confusion.patch
and it can be found in the queue-5.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit f27486227d7cc1d16b3677158de06c409a1a4bd5
Author: Pierre-Louis Bossart <pierre-louis.bossart@xxxxxxxxxxxxxxx>
Date:   Fri Sep 4 04:47:37 2020 +0800

    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@xxxxxxxxxxxxxxx>
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@xxxxxxxxxxxxxxx>
    Reviewed-by: Rander Wang <rander.wang@xxxxxxxxxxxxxxx>
    Signed-off-by: Bard Liao <yung-chuan.liao@xxxxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20200903204739.31206-3-yung-chuan.liao@xxxxxxxxxxxxxxx
    Signed-off-by: Vinod Koul <vkoul@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c
index a283670659a92..10ff166977f8f 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;
 }



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux