summaryrefslogtreecommitdiff
path: root/sound/core/hwdep.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-03-10 15:42:14 +0100
committerTakashi Iwai <tiwai@suse.de>2015-03-10 15:42:14 +0100
commitec0e9937aaa8b0a4b0633711c4d70d622acd9a7f (patch)
tree7c19729d7bbd4d97784b45b2e2ec1b13dd005dd6 /sound/core/hwdep.c
parent24db8bbaa3fcfaf0c2faccbff5864b58088ac1f6 (diff)
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/hwdep.c')
-rw-r--r--sound/core/hwdep.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sound/core/hwdep.c b/sound/core/hwdep.c
index 84244a5143cf..51692c8a39ea 100644
--- a/sound/core/hwdep.c
+++ b/sound/core/hwdep.c
@@ -378,10 +378,8 @@ int snd_hwdep_new(struct snd_card *card, char *id, int device,
if (rhwdep)
*rhwdep = NULL;
hwdep = kzalloc(sizeof(*hwdep), GFP_KERNEL);
- if (hwdep == NULL) {
- dev_err(card->dev, "hwdep: cannot allocate\n");
+ if (!hwdep)
return -ENOMEM;
- }
init_waitqueue_head(&hwdep->open_wait);
mutex_init(&hwdep->open_mutex);