[PATCH 3/3 v2] ASoC: soc-core: remove unnecessary message from snd_soc_register_component()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>

No need to print an error message if kzalloc fails.
The core will print it.

Reported-by: Daniel Baluta <daniel.baluta@xxxxxxxxx>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>
---
v1 -> v2

 - new patch which was reported by Daniel

 sound/soc/soc-core.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 166b6d2..a3dcf14 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -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);
-- 
1.9.1

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux