ASoC: fsl_spdif: Fix incorrect usage of regmap_read()
Subsystems (3)
PATCH 1/2 ASoC: fsl_spdif: Fix incorrect usage of regmap_read()
We should not copy the return value into this val since it's supposed to get the value of the register not the success result of regmap_read(). Thus fix it.
Signed-off-by Nicolin Chen <[email protected]>
--- sound/soc/fsl/fsl_spdif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/fsl/fsl_spdif.c +1 -1
@@ -762,7 +762,7 @@ static int fsl_spdif_vbit_get(struct snd_kcontrol *kcontrol,struct regmap *regmap = spdif_priv->regmap;u32 val; - val =regmap_read (regmap,REG_SPDIF_SIS , &val); +regmap_read (regmap,REG_SPDIF_SIS , &val); ucontrol->value.integer.value[0 ] = (val &INT_VAL_NOGOOD ) !=0 ;regmap_write (regmap,REG_SPDIF_SIC ,INT_VAL_NOGOOD );
Signature · 1 line
1.8.4
Quoted 3 lines · Nicolin Chen
We should not copy the return value into this val since it's supposed to get the value of the register not the success result of
regmap_read(). Thus fix it.
Applied, thanks.