ASoC: fsl: fsl_spdif: signedness bug in fsl_spdif_startup()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 9 Jul 2015 08:21:03 +0000 (11:21 +0300)
committerMark Brown <broonie@kernel.org>
Tue, 14 Jul 2015 17:54:10 +0000 (18:54 +0100)
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>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/fsl/fsl_spdif.c

index 8e932219cb3af924398f5296ea77758313d0ca7b..851b83373d4ceda7436a8779e4ae0e8081948a27 100644 (file)
@@ -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 */