aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/hwdep.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-11-17 11:44:01 -0500
committerJaroslav Kysela <perex@suse.cz>2006-01-03 06:28:58 -0500
commit73e77ba0235532bd7523ba90883d325f6e095acf (patch)
treed22f29805ade9e78bd5f1802590d42f6e121c3c1 /sound/core/hwdep.c
parent00a4e3d9f8df8a90966b75d517154718b4a2242a (diff)
[ALSA] Add error messages
Add error messages in the critial error path to be more verbose. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/hwdep.c')
-rw-r--r--sound/core/hwdep.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sound/core/hwdep.c b/sound/core/hwdep.c
index da0fb9f08413..444e266e7c48 100644
--- a/sound/core/hwdep.c
+++ b/sound/core/hwdep.c
@@ -364,13 +364,14 @@ int snd_hwdep_new(struct snd_card *card, char *id, int device,
364 *rhwdep = NULL; 364 *rhwdep = NULL;
365 snd_assert(card != NULL, return -ENXIO); 365 snd_assert(card != NULL, return -ENXIO);
366 hwdep = kzalloc(sizeof(*hwdep), GFP_KERNEL); 366 hwdep = kzalloc(sizeof(*hwdep), GFP_KERNEL);
367 if (hwdep == NULL) 367 if (hwdep == NULL) {
368 snd_printk(KERN_ERR "hwdep: cannot allocate\n");
368 return -ENOMEM; 369 return -ENOMEM;
370 }
369 hwdep->card = card; 371 hwdep->card = card;
370 hwdep->device = device; 372 hwdep->device = device;
371 if (id) { 373 if (id)
372 strlcpy(hwdep->id, id, sizeof(hwdep->id)); 374 strlcpy(hwdep->id, id, sizeof(hwdep->id));
373 }
374#ifdef CONFIG_SND_OSSEMUL 375#ifdef CONFIG_SND_OSSEMUL
375 hwdep->oss_type = -1; 376 hwdep->oss_type = -1;
376#endif 377#endif