summaryrefslogtreecommitdiff
path: root/sound/core/timer.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-03-10 17:42:14 +0300
committerTakashi Iwai <tiwai@suse.de>2015-03-10 17:42:14 +0300
commitec0e9937aaa8b0a4b0633711c4d70d622acd9a7f (patch)
tree7c19729d7bbd4d97784b45b2e2ec1b13dd005dd6 /sound/core/timer.c
parent24db8bbaa3fcfaf0c2faccbff5864b58088ac1f6 (diff)
downloadlinux-ec0e9937aaa8b0a4b0633711c4d70d622acd9a7f.tar.xz
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 <tiwai@suse.de>
Diffstat (limited to 'sound/core/timer.c')
-rw-r--r--sound/core/timer.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sound/core/timer.c b/sound/core/timer.c
index 490b489d713d..a9a1a047c521 100644
--- a/sound/core/timer.c
+++ b/sound/core/timer.c
@@ -774,10 +774,8 @@ int snd_timer_new(struct snd_card *card, char *id, struct snd_timer_id *tid,
if (rtimer)
*rtimer = NULL;
timer = kzalloc(sizeof(*timer), GFP_KERNEL);
- if (timer == NULL) {
- pr_err("ALSA: timer: cannot allocate\n");
+ if (!timer)
return -ENOMEM;
- }
timer->tmr_class = tid->dev_class;
timer->card = card;
timer->tmr_device = tid->device;