Skip to content

Commit

Permalink
ASoC: soc-dapm.c: don't use WARN_ON() at snd_soc_dai_link_event_pre_p…
Browse files Browse the repository at this point in the history
…mu()

Current snd_soc_dai_link_event_pre_pmu() is checking "config".
It is using dev_err() (A) if it was NULL, so we don't need to use
WARN_ON() (B) to check it, it is over-kill. This patch removes it.

(B)	if (WARN_ON(!config)) {
(A)		dev_err(...);
		...
	}

Signed-off-by: Kuninori Morimoto <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
morimoto authored and broonie committed Sep 7, 2022
1 parent d2a411f commit 427de09
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/soc/soc-dapm.c
Original file line number Diff line number Diff line change
Expand Up @@ -3885,7 +3885,7 @@ snd_soc_dai_link_event_pre_pmu(struct snd_soc_dapm_widget *w,
* necessary
*/
config = rtd->dai_link->params + rtd->params_select;
if (WARN_ON(!config)) {
if (!config) {
dev_err(w->dapm->dev, "ASoC: link config missing\n");
ret = -EINVAL;
goto out;
Expand Down

0 comments on commit 427de09

Please sign in to comment.