diff mbox

ASoC: cs35l35: returning uninitialized in probe()

Message ID 20170313123237.GA9287@mwanda (mailing list archive)
State Accepted
Commit bfe41c678d49f440de3ae80b945f7f94d5dbd340
Headers show

Commit Message

Dan Carpenter March 13, 2017, 12:32 p.m. UTC
If cs35l35->pdata.stereo is false then "ret" isn't initialized.

Fixes: 6387f866a2cc ("ASoC: Add support for Cirrus Logic CS35L35 Amplifier")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Comments

Paul Handrigan March 13, 2017, 2:36 p.m. UTC | #1
On Mon, 13 Mar 2017, Dan Carpenter wrote:

> If cs35l35->pdata.stereo is false then "ret" isn't initialized.
> 
> Fixes: 6387f866a2cc ("ASoC: Add support for Cirrus Logic CS35L35 Amplifier")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> diff --git a/sound/soc/codecs/cs35l35.c b/sound/soc/codecs/cs35l35.c
> index 260ed42c71e9..142ae642eaa1 100644
> --- a/sound/soc/codecs/cs35l35.c
> +++ b/sound/soc/codecs/cs35l35.c
> @@ -964,7 +964,7 @@ static int cs35l35_codec_probe(struct snd_soc_codec *codec)
>  		}
>  	}
>  
> -	return ret;
> +	return 0;
>  }
>  
>  static struct snd_soc_codec_driver soc_codec_dev_cs35l35 = {
> 
Acked-by: Paul Handrigan <Paul.Handrigan@cirrus.com>
diff mbox

Patch

diff --git a/sound/soc/codecs/cs35l35.c b/sound/soc/codecs/cs35l35.c
index 260ed42c71e9..142ae642eaa1 100644
--- a/sound/soc/codecs/cs35l35.c
+++ b/sound/soc/codecs/cs35l35.c
@@ -964,7 +964,7 @@  static int cs35l35_codec_probe(struct snd_soc_codec *codec)
 		}
 	}
 
-	return ret;
+	return 0;
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_cs35l35 = {