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
This commit is contained in:
Mark Brown 2021-04-19 16:21:45 +01:00
commit 87143bfdb9
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
4 changed files with 3 additions and 10 deletions

View File

@ -1620,8 +1620,6 @@ static int rx_macro_set_interpolator_rate(struct snd_soc_dai *dai,
return ret; return ret;
ret = rx_macro_set_mix_interpolator_rate(dai, rate_val, sample_rate); ret = rx_macro_set_mix_interpolator_rate(dai, rate_val, sample_rate);
if (ret)
return ret;
return ret; return ret;
} }

View File

@ -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); (pll_code.n_code << RT5682_PLL_N_SFT) | pll_code.k_code);
snd_soc_component_write(component, RT5682_PLL_CTRL_2, 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 ? 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; rt5682->pll_in[pll_id] = freq_in;

View File

@ -34,7 +34,7 @@ static acpi_status snd_soc_acpi_find_package(acpi_handle handle, u32 level,
void *context, void **ret) void *context, void **ret)
{ {
struct acpi_device *adev; struct acpi_device *adev;
acpi_status status = AE_OK; acpi_status status;
struct snd_soc_acpi_package_context *pkg_ctx = context; struct snd_soc_acpi_package_context *pkg_ctx = context;
pkg_ctx->data_valid = false; pkg_ctx->data_valid = false;

View File

@ -2219,7 +2219,7 @@ static char *fmt_single_name(struct device *dev, int *id)
{ {
const char *devname = dev_name(dev); const char *devname = dev_name(dev);
char *found, *name; char *found, *name;
int id1, id2; unsigned int id1, id2;
if (devname == NULL) if (devname == NULL)
return NULL; return NULL;
@ -2785,11 +2785,6 @@ int snd_soc_of_parse_audio_routing(struct snd_soc_card *card,
return -EINVAL; return -EINVAL;
} }
num_routes /= 2; 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), routes = devm_kcalloc(card->dev, num_routes, sizeof(*routes),
GFP_KERNEL); GFP_KERNEL);