aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/device.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/device.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/device.c')
-rw-r--r--sound/core/device.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/core/device.c b/sound/core/device.c
index afa8cc7fb05..b1cf6ec5678 100644
--- a/sound/core/device.c
+++ b/sound/core/device.c
@@ -50,8 +50,10 @@ int snd_device_new(struct snd_card *card, snd_device_type_t type,
50 snd_assert(device_data != NULL, return -ENXIO); 50 snd_assert(device_data != NULL, return -ENXIO);
51 snd_assert(ops != NULL, return -ENXIO); 51 snd_assert(ops != NULL, return -ENXIO);
52 dev = kzalloc(sizeof(*dev), GFP_KERNEL); 52 dev = kzalloc(sizeof(*dev), GFP_KERNEL);
53 if (dev == NULL) 53 if (dev == NULL) {
54 snd_printk(KERN_ERR "Cannot allocate device\n");
54 return -ENOMEM; 55 return -ENOMEM;
56 }
55 dev->card = card; 57 dev->card = card;
56 dev->type = type; 58 dev->type = type;
57 dev->state = SNDRV_DEV_BUILD; 59 dev->state = SNDRV_DEV_BUILD;
@@ -173,6 +175,7 @@ int snd_device_register(struct snd_card *card, void *device_data)
173 dev->state = SNDRV_DEV_REGISTERED; 175 dev->state = SNDRV_DEV_REGISTERED;
174 return 0; 176 return 0;
175 } 177 }
178 snd_printd("snd_device_register busy\n");
176 return -EBUSY; 179 return -EBUSY;
177 } 180 }
178 snd_BUG(); 181 snd_BUG();