aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/hwdep.c
diff options
context:
space:
mode:
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,
378 if (rhwdep) 378 if (rhwdep)
379 *rhwdep = NULL; 379 *rhwdep = NULL;
380 hwdep = kzalloc(sizeof(*hwdep), GFP_KERNEL); 380 hwdep = kzalloc(sizeof(*hwdep), GFP_KERNEL);
381 if (hwdep == NULL) { 381 if (!hwdep)
382 dev_err(card->dev, "hwdep: cannot allocate\n");
383 return -ENOMEM; 382 return -ENOMEM;
384 }
385 383
386 init_waitqueue_head(&hwdep->open_wait); 384 init_waitqueue_head(&hwdep->open_wait);
387 mutex_init(&hwdep->open_mutex); 385 mutex_init(&hwdep->open_mutex);