From ec0e9937aaa8b0a4b0633711c4d70d622acd9a7f Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 10 Mar 2015 15:42:14 +0100 Subject: ALSA: core: Drop superfluous error/debug messages after malloc failures The kernel memory allocators already report the errors when the requested allocation fails, thus we don't need to warn it again in each caller side. Signed-off-by: Takashi Iwai --- sound/core/control.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'sound/core/control.c') diff --git a/sound/core/control.c b/sound/core/control.c index e1d8e0c816f0..833b223a363a 100644 --- a/sound/core/control.c +++ b/sound/core/control.c @@ -217,10 +217,8 @@ static int snd_ctl_new(struct snd_kcontrol **kctl, unsigned int count, size += sizeof(struct snd_kcontrol_volatile) * count; *kctl = kzalloc(size, GFP_KERNEL); - if (*kctl == NULL) { - pr_err("ALSA: Cannot allocate control instance\n"); + if (!*kctl) return -ENOMEM; - } for (idx = 0; idx < count; idx++) { (*kctl)->vd[idx].access = access; -- cgit v1.2.3-55-g7522