diff options
author | Mark Brown | 2021-04-19 16:21:45 +0100 |
---|---|---|
committer | Mark Brown | 2021-04-19 16:21:45 +0100 |
commit | 87143bfdb9f7ddc14b129fda610e114d29077596 (patch) | |
tree | 1ded2e415970708dbf31ca62fdbe423dcf222c01 /sound | |
parent | e86a53fb64ed0a4749eeac2eccc7a6412fd3c920 (diff) | |
parent | 9726db36ed83670be93d053e05e150308e3ce743 (diff) |
Merge series "ASoC: remove more cppcheck warnings" from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:
I missed those warnings in the previous rounds, they are mostly
trivial and shouldn't change the behavior.
Pierre-Louis Bossart (5):
ASoC: soc-acpi: remove useless initialization
ASoC: soc-core: fix signed/unsigned issue
ASoC: soc-core: fix always-false condition
ASoC: codecs: lpass-rx-macro: remove useless return
ASoC: codecs: rt5682: clarify expression
sound/soc/codecs/lpass-rx-macro.c | 2 --
sound/soc/codecs/rt5682.c | 2 +-
sound/soc/soc-acpi.c | 2 +-
sound/soc/soc-core.c | 7 +------
4 files changed, 3 insertions(+), 10 deletions(-)
--
2.25.1
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/lpass-rx-macro.c | 2 | ||||
-rw-r--r-- | sound/soc/codecs/rt5682.c | 2 | ||||
-rw-r--r-- | sound/soc/soc-acpi.c | 2 | ||||
-rw-r--r-- | sound/soc/soc-core.c | 7 |
4 files changed, 3 insertions, 10 deletions
diff --git a/sound/soc/codecs/lpass-rx-macro.c b/sound/soc/codecs/lpass-rx-macro.c index 14c166506fb1..4f1b569d7c47 100644 --- a/sound/soc/codecs/lpass-rx-macro.c +++ b/sound/soc/codecs/lpass-rx-macro.c @@ -1620,8 +1620,6 @@ static int rx_macro_set_interpolator_rate(struct snd_soc_dai *dai, return ret; ret = rx_macro_set_mix_interpolator_rate(dai, rate_val, sample_rate); - if (ret) - return ret; return ret; } diff --git a/sound/soc/codecs/rt5682.c b/sound/soc/codecs/rt5682.c index 0e2a10ed11da..a5aacfe01a0d 100644 --- a/sound/soc/codecs/rt5682.c +++ b/sound/soc/codecs/rt5682.c @@ -2401,7 +2401,7 @@ static int rt5682_set_component_pll(struct snd_soc_component *component, (pll_code.n_code << RT5682_PLL_N_SFT) | pll_code.k_code); snd_soc_component_write(component, RT5682_PLL_CTRL_2, ((pll_code.m_bp ? 0 : pll_code.m_code) << RT5682_PLL_M_SFT) | - (pll_code.m_bp << RT5682_PLL_M_BP_SFT | RT5682_PLL_RST)); + ((pll_code.m_bp << RT5682_PLL_M_BP_SFT) | RT5682_PLL_RST)); } rt5682->pll_in[pll_id] = freq_in; diff --git a/sound/soc/soc-acpi.c b/sound/soc/soc-acpi.c index 444ce0602f76..395229bf5c51 100644 --- a/sound/soc/soc-acpi.c +++ b/sound/soc/soc-acpi.c @@ -34,7 +34,7 @@ static acpi_status snd_soc_acpi_find_package(acpi_handle handle, u32 level, void *context, void **ret) { struct acpi_device *adev; - acpi_status status = AE_OK; + acpi_status status; struct snd_soc_acpi_package_context *pkg_ctx = context; pkg_ctx->data_valid = false; diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 80374c82c501..1c0904acb935 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -2219,7 +2219,7 @@ static char *fmt_single_name(struct device *dev, int *id) { const char *devname = dev_name(dev); char *found, *name; - int id1, id2; + unsigned int id1, id2; if (devname == NULL) return NULL; @@ -2785,11 +2785,6 @@ int snd_soc_of_parse_audio_routing(struct snd_soc_card *card, return -EINVAL; } num_routes /= 2; - if (!num_routes) { - dev_err(card->dev, "ASoC: Property '%s's length is zero\n", - propname); - return -EINVAL; - } routes = devm_kcalloc(card->dev, num_routes, sizeof(*routes), GFP_KERNEL); |