From 5dc5e76b4c41fc8cdd9ed77653b2ce453974fb30 Mon Sep 17 00:00:00 2001 From: Lukasz Majewski Date: Fri, 16 Dec 2022 10:46:22 +0100 Subject: [PATCH] ASoC: wm8940: Remove warning when no plat data present The lack of platform data in the contemporary Linux shall not be the reason to display warnings to the kernel logs. Signed-off-by: Lukasz Majewski Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20221216094624.3849278-1-lukma@denx.de Signed-off-by: Mark Brown --- sound/soc/codecs/wm8940.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sound/soc/codecs/wm8940.c b/sound/soc/codecs/wm8940.c index 8dac9fd..0b59020 100644 --- a/sound/soc/codecs/wm8940.c +++ b/sound/soc/codecs/wm8940.c @@ -709,9 +709,7 @@ static int wm8940_probe(struct snd_soc_component *component) if (ret < 0) return ret; - if (!pdata) - dev_warn(component->dev, "No platform data supplied\n"); - else { + if (pdata) { reg = snd_soc_component_read(component, WM8940_OUTPUTCTL); ret = snd_soc_component_write(component, WM8940_OUTPUTCTL, reg | pdata->vroi); if (ret < 0) -- 2.7.4