Skip to content

Commit

Permalink
ASoC: soc-core: remove unnecessary message from snd_soc_register_comp…
Browse files Browse the repository at this point in the history
…onent()

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>
  • Loading branch information
Kuninori Morimoto authored and Mark Brown committed Oct 10, 2017
1 parent d734627 commit 08e61d0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions sound/soc/soc-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 08e61d0

Please sign in to comment.