[PATCH 1/3] ASoC: cs35l36: Remove unneeded variable initialisation
Pierre-Louis Bossart
pierre-louis.bossart at linux.intel.com
Tue May 11 18:31:39 CEST 2021
On 5/11/21 5:10 AM, Charles Keepax wrote:
> Reported-by: Pierre-Louis Bossart <pierre-louis.bossart at linux.intel.com>
> Signed-off-by: Charles Keepax <ckeepax at opensource.cirrus.com>
Thanks, I rechecked with this patchset applied on top of the previous
one, there's only one warning left:
sound/soc/codecs/cs42l56.c:1308:6: style: Variable 'ret' is reassigned a
value before the old one has been used. [redundantAssignment]
ret = devm_snd_soc_register_component(&i2c_client->dev,
^
sound/soc/codecs/cs42l56.c:1247:6: note: ret is assigned
ret = regmap_read(cs42l56->regmap, CS42L56_CHIP_ID_1, ®);
^
sound/soc/codecs/cs42l56.c:1308:6: note: ret is overwritten
ret = devm_snd_soc_register_component(&i2c_client->dev,
^
> ---
> sound/soc/codecs/cs35l36.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sound/soc/codecs/cs35l36.c b/sound/soc/codecs/cs35l36.c
> index a038bcec2d17c..db5472b10465b 100644
> --- a/sound/soc/codecs/cs35l36.c
> +++ b/sound/soc/codecs/cs35l36.c
> @@ -1156,7 +1156,7 @@ static int cs35l36_component_probe(struct snd_soc_component *component)
> {
> struct cs35l36_private *cs35l36 =
> snd_soc_component_get_drvdata(component);
> - int ret = 0;
> + int ret;
>
> if ((cs35l36->rev_id == CS35L36_REV_A0) && cs35l36->pdata.dcm_mode) {
> regmap_update_bits(cs35l36->regmap, CS35L36_BSTCVRT_DCM_CTRL,
>
More information about the Alsa-devel
mailing list