Re: [PATCH] ASoC: Intel: sof_rt5682: Fix uninitialized variable in probe

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

 




On 4/8/24 02:35, Dan Carpenter wrote:
> Initialize "is_legacy_cpu" to false to prevent an uninitialized variable
> bug.
> 
> Fixes: 8efcd4864652 ("ASoC: Intel: sof_rt5682: use common module for sof_card_private initialization")
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

Good catch.

Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@xxxxxxxxxxxxxxx>

> ---
>  sound/soc/intel/boards/sof_rt5682.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/soc/intel/boards/sof_rt5682.c b/sound/soc/intel/boards/sof_rt5682.c
> index aadd341a202c..966bcd3e8bdc 100644
> --- a/sound/soc/intel/boards/sof_rt5682.c
> +++ b/sound/soc/intel/boards/sof_rt5682.c
> @@ -606,7 +606,7 @@ static int sof_audio_probe(struct platform_device *pdev)
>  {
>  	struct snd_soc_acpi_mach *mach = pdev->dev.platform_data;
>  	struct sof_card_private *ctx;
> -	bool is_legacy_cpu;
> +	bool is_legacy_cpu = false;
>  	int ret;
>  
>  	if (pdev->id_entry && pdev->id_entry->driver_data)



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux