diff options
author | Mark Brown <broonie@kernel.org> | 2021-08-05 20:15:53 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-08-05 20:15:53 +0100 |
commit | 41bc951de77aea91913e583bde3a91a3aec66268 (patch) | |
tree | 83bee3811267240eeac914a9a52330c73a71acaf | |
parent | 7002ab41920f385950cd2b116ce79d4424fa6f9e (diff) | |
parent | 8c62dbcb489aa038fcb9c73faa5c6b56f1f54902 (diff) |
Merge series "ASoC: codecs: cppcheck warnings" from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:
Two minor corrections for return values, and one more important one
for max98090 where duplicate reads don't seem necessary.
Pierre-Louis Bossart (3):
ASoC: max98090: remove duplicate status reads and useless assignmment
ASoC: mt6359-accdet.c: remove useless assignments
ASoC: wcd938x: simplify return value
sound/soc/codecs/max98090.c | 4 +---
sound/soc/codecs/mt6359-accdet.c | 8 ++++----
sound/soc/codecs/wcd938x.c | 2 +-
3 files changed, 6 insertions(+), 8 deletions(-)
--
2.25.1
-rw-r--r-- | sound/soc/codecs/max98090.c | 4 | ||||
-rw-r--r-- | sound/soc/codecs/mt6359-accdet.c | 8 | ||||
-rw-r--r-- | sound/soc/codecs/wcd938x.c | 2 |
3 files changed, 6 insertions, 8 deletions
diff --git a/sound/soc/codecs/max98090.c b/sound/soc/codecs/max98090.c index bc30a1dc7530..b45ec35cd63c 100644 --- a/sound/soc/codecs/max98090.c +++ b/sound/soc/codecs/max98090.c @@ -2158,13 +2158,11 @@ static void max98090_jack_work(struct work_struct *work) msleep(50); - reg = snd_soc_component_read(component, M98090_REG_JACK_STATUS); + snd_soc_component_read(component, M98090_REG_JACK_STATUS); /* Weak pull up allows only insertion detection */ snd_soc_component_update_bits(component, M98090_REG_JACK_DETECT, M98090_JDWK_MASK, M98090_JDWK_MASK); - } else { - reg = snd_soc_component_read(component, M98090_REG_JACK_STATUS); } reg = snd_soc_component_read(component, M98090_REG_JACK_STATUS); diff --git a/sound/soc/codecs/mt6359-accdet.c b/sound/soc/codecs/mt6359-accdet.c index aec77f0ac3bb..6d3d170144a0 100644 --- a/sound/soc/codecs/mt6359-accdet.c +++ b/sound/soc/codecs/mt6359-accdet.c @@ -234,7 +234,7 @@ static void recover_eint_setting(struct mt6359_accdet *priv) static void mt6359_accdet_recover_jd_setting(struct mt6359_accdet *priv) { - int ret = 0; + int ret; unsigned int value = 0; regmap_update_bits(priv->regmap, ACCDET_IRQ_ADDR, @@ -461,7 +461,7 @@ static irqreturn_t mt6359_accdet_irq(int irq, void *data) { struct mt6359_accdet *priv = data; unsigned int irq_val = 0, val = 0, value = 0; - int ret = 0; + int ret; mutex_lock(&priv->res_lock); regmap_read(priv->regmap, ACCDET_IRQ_ADDR, &irq_val); @@ -551,7 +551,7 @@ static irqreturn_t mt6359_accdet_irq(int irq, void *data) static int mt6359_accdet_parse_dt(struct mt6359_accdet *priv) { - int ret = 0; + int ret; struct device *dev = priv->dev; struct device_node *node = NULL; int pwm_deb[15] = {0}; @@ -926,7 +926,7 @@ static int mt6359_accdet_probe(struct platform_device *pdev) { struct mt6359_accdet *priv; struct mt6397_chip *mt6397 = dev_get_drvdata(pdev->dev.parent); - int ret = 0; + int ret; dev_dbg(&pdev->dev, "%s(), dev name %s\n", __func__, dev_name(&pdev->dev)); diff --git a/sound/soc/codecs/wcd938x.c b/sound/soc/codecs/wcd938x.c index a627142426b2..555904ec4fdc 100644 --- a/sound/soc/codecs/wcd938x.c +++ b/sound/soc/codecs/wcd938x.c @@ -3698,7 +3698,7 @@ static int wcd938x_probe(struct platform_device *pdev) pm_runtime_enable(dev); pm_runtime_idle(dev); - return ret; + return 0; } static int wcd938x_remove(struct platform_device *pdev) |