Skip to content

Commit

Permalink
ASoC: rk817: fix a warning in rk817_probe()
Browse files Browse the repository at this point in the history
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: 0d6a04d ("ASoC: Add Rockchip rk817 audio CODEC support")

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
  • Loading branch information
Chris Morgan authored and Lee Jones committed Jun 2, 2021
1 parent 437faaa commit ef7570b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions sound/soc/codecs/rk817_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit ef7570b

Please sign in to comment.