diff mbox

ASoC: fsl: fsl_spdif: signedness bug in fsl_spdif_startup()

Message ID 20150709082103.GA13462@mwanda (mailing list archive)
State Accepted
Commit 89e0e250f92b0b0233337043ddf76f261916036c
Headers show

Commit Message

Dan Carpenter July 9, 2015, 8:21 a.m. UTC
We need "i" to be signed or it leads to a forever loop in the error
handling.

Fixes: fa3be9208dcb ('ASoC: fsl: fsl_spdif: Check for clk_prepare_enable() error')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Comments

Nicolin Chen July 9, 2015, 2:59 p.m. UTC | #1
On Thu, Jul 09, 2015 at 11:21:03AM +0300, Dan Carpenter wrote:
> We need "i" to be signed or it leads to a forever loop in the error
> handling.
> 
> Fixes: fa3be9208dcb ('ASoC: fsl: fsl_spdif: Check for clk_prepare_enable() error')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>


Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>

Thank you

> diff --git a/sound/soc/fsl/fsl_spdif.c b/sound/soc/fsl/fsl_spdif.c
> index 3ee4539..7a92f30 100644
> --- a/sound/soc/fsl/fsl_spdif.c
> +++ b/sound/soc/fsl/fsl_spdif.c
> @@ -454,7 +454,8 @@ static int fsl_spdif_startup(struct snd_pcm_substream *substream,
>  	struct fsl_spdif_priv *spdif_priv = snd_soc_dai_get_drvdata(rtd->cpu_dai);
>  	struct platform_device *pdev = spdif_priv->pdev;
>  	struct regmap *regmap = spdif_priv->regmap;
> -	u32 scr, mask, i;
> +	u32 scr, mask;
> +	int i;
>  	int ret;
>  
>  	/* Reset module and interrupts only for first initialization */
diff mbox

Patch

diff --git a/sound/soc/fsl/fsl_spdif.c b/sound/soc/fsl/fsl_spdif.c
index 3ee4539..7a92f30 100644
--- a/sound/soc/fsl/fsl_spdif.c
+++ b/sound/soc/fsl/fsl_spdif.c
@@ -454,7 +454,8 @@  static int fsl_spdif_startup(struct snd_pcm_substream *substream,
 	struct fsl_spdif_priv *spdif_priv = snd_soc_dai_get_drvdata(rtd->cpu_dai);
 	struct platform_device *pdev = spdif_priv->pdev;
 	struct regmap *regmap = spdif_priv->regmap;
-	u32 scr, mask, i;
+	u32 scr, mask;
+	int i;
 	int ret;
 
 	/* Reset module and interrupts only for first initialization */