ASoC: rk817: fix a warning in rk817_probe()
authorChris Morgan <macromorgan@hotmail.com>
Tue, 1 Jun 2021 21:44:24 +0000 (16:44 -0500)
committerLee Jones <lee.jones@linaro.org>
Wed, 2 Jun 2021 07:05:23 +0000 (08:05 +0100)
The return value of snd_soc_component_write() is stored but not
evaluated and this results in a warning when W=1 is set. Stop storing
the return value to be consistent with all other calls of
snd_soc_component_write() and to remove the warning.

Fixes: 0d6a04da9b25 ("ASoC: Add Rockchip rk817 audio CODEC support")
Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
sound/soc/codecs/rk817_codec.c

index 17e672b85ee5810324e6ec901afcac69eb7cc3b6..fd3a5ba034a9c709cc31f1a1d0c99ae1e860922c 100644 (file)
@@ -415,12 +415,11 @@ static int rk817_probe(struct snd_soc_component *component)
 {
        struct rk817_codec_priv *rk817 = snd_soc_component_get_drvdata(component);
        struct rk808 *rk808 = dev_get_drvdata(component->dev->parent);
-       int ret;
 
        snd_soc_component_init_regmap(component, rk808->regmap);
        rk817->component = component;
 
-       ret = snd_soc_component_write(component, RK817_CODEC_DTOP_LPT_SRST, 0x40);
+       snd_soc_component_write(component, RK817_CODEC_DTOP_LPT_SRST, 0x40);
 
        rk817_init(component);