ASoC: soc-core: remove unnecessary message from snd_soc_register_component()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Mon, 2 Oct 2017 05:10:33 +0000 (05:10 +0000)
committerMark Brown <broonie@kernel.org>
Tue, 10 Oct 2017 09:23:11 +0000 (10:23 +0100)
No need to print an error message if kzalloc fails.
The core will print it.

Reported-by: Daniel Baluta <daniel.baluta@gmail.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-core.c

index 166b6d2..a3dcf14 100644 (file)
@@ -3445,10 +3445,8 @@ int snd_soc_register_component(struct device *dev,
        struct snd_soc_component *component;
 
        component = kzalloc(sizeof(*component), GFP_KERNEL);
-       if (!component) {
-               dev_err(dev, "ASoC: Failed to allocate memory\n");
+       if (!component)
                return -ENOMEM;
-       }
 
        return snd_soc_add_component(dev, component, component_driver,
                                     dai_drv, num_dai);