diff options
author | Mark Brown | 2021-03-01 23:31:50 +0000 |
---|---|---|
committer | Mark Brown | 2021-03-10 13:08:31 +0000 |
commit | 260fe5535b693f7ac763f77e3267b5a7b34ace9c (patch) | |
tree | 20da0fcc02bb9d1b2d7da74ddfee0b4c2d7ac8f6 /sound | |
parent | 4ea62149dc62d06dc39eb4870e04fda1a34360c3 (diff) | |
parent | c856cef731ddfde68ec21a827919aef68e37fb27 (diff) |
Merge series "ASoC: samsung: remove cppcheck warnings" from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:
No functional changes except for patch 2 and 3 where missing error
checks were added for consistency.
Pierre-Louis Bossart (6):
ASoC: samsung: i2s: remove unassigned variable
ASoC: samsung: s3c24xx_simtec: add missing error check
ASoC: samsung: smdk_wm8994: add missing return
ASoC: samsung: snow: remove useless test
ASoC: samsung: tm2_wm5110: check of_parse return value
ASoC: samsung: tm2_wm5510: remove shadowing variable
sound/soc/samsung/i2s.c | 3 +--
sound/soc/samsung/s3c24xx_simtec.c | 5 +++++
sound/soc/samsung/smdk_wm8994.c | 1 +
sound/soc/samsung/snow.c | 5 +----
sound/soc/samsung/tm2_wm5110.c | 3 +--
5 files changed, 9 insertions(+), 8 deletions(-)
--
2.25.1
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/samsung/i2s.c | 3 | ||||
-rw-r--r-- | sound/soc/samsung/s3c24xx_simtec.c | 5 | ||||
-rw-r--r-- | sound/soc/samsung/smdk_wm8994.c | 1 | ||||
-rw-r--r-- | sound/soc/samsung/snow.c | 5 |
4 files changed, 8 insertions, 6 deletions
diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index b043183174b2..c632842d42eb 100644 --- a/sound/soc/samsung/i2s.c +++ b/sound/soc/samsung/i2s.c @@ -1156,11 +1156,10 @@ static int i2s_alloc_dais(struct samsung_i2s_priv *priv, static const char *stream_names[] = { "Primary Playback", "Secondary Playback" }; struct snd_soc_dai_driver *dai_drv; - struct i2s_dai *dai; int i; priv->dai = devm_kcalloc(&priv->pdev->dev, num_dais, - sizeof(*dai), GFP_KERNEL); + sizeof(struct i2s_dai), GFP_KERNEL); if (!priv->dai) return -ENOMEM; diff --git a/sound/soc/samsung/s3c24xx_simtec.c b/sound/soc/samsung/s3c24xx_simtec.c index 3cddd11344ac..81a29d12c57d 100644 --- a/sound/soc/samsung/s3c24xx_simtec.c +++ b/sound/soc/samsung/s3c24xx_simtec.c @@ -190,6 +190,11 @@ static int simtec_hw_params(struct snd_pcm_substream *substream, ret = snd_soc_dai_set_clkdiv(cpu_dai, S3C24XX_DIV_PRESCALER, cdclk_scale); + if (ret) { + pr_err("%s: failed to set clock div\n", + __func__); + return ret; + } } return 0; diff --git a/sound/soc/samsung/smdk_wm8994.c b/sound/soc/samsung/smdk_wm8994.c index 681b244d5312..39a7a449f554 100644 --- a/sound/soc/samsung/smdk_wm8994.c +++ b/sound/soc/samsung/smdk_wm8994.c @@ -164,6 +164,7 @@ static int smdk_audio_probe(struct platform_device *pdev) dev_err(&pdev->dev, "Property 'samsung,i2s-controller' missing or invalid\n"); ret = -EINVAL; + return ret; } smdk_dai[0].platforms->name = NULL; diff --git a/sound/soc/samsung/snow.c b/sound/soc/samsung/snow.c index 989af624dd11..6da674e901ca 100644 --- a/sound/soc/samsung/snow.c +++ b/sound/soc/samsung/snow.c @@ -109,10 +109,7 @@ static int snow_late_probe(struct snd_soc_card *card) rtd = snd_soc_get_pcm_runtime(card, &card->dai_link[0]); /* In the multi-codec case codec_dais 0 is MAX98095 and 1 is HDMI. */ - if (rtd->num_codecs > 1) - codec_dai = asoc_rtd_to_codec(rtd, 0); - else - codec_dai = asoc_rtd_to_codec(rtd, 0); + codec_dai = asoc_rtd_to_codec(rtd, 0); /* Set the MCLK rate for the codec */ return snd_soc_dai_set_sysclk(codec_dai, 0, |