Commit a3352f01 authored by Henrik Kretzschmar's avatar Henrik Kretzschmar Committed by Jaroslav Kysela

[ALSA] Fix two typos and changes on snd_assert()

ALSA Core
Both typos were in the kerneldocs.

I splitted the snd_assert() calls in one-expression-per-call for better
debugging.
Signed-off-by: default avatarHenrik Kretzschmar <henne@nachtwindheim.de>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 7a318a70
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
/** /**
* snd_device_new - create an ALSA device component * snd_device_new - create an ALSA device component
* @card: the card instance * @card: the card instance
* @type: the device type, SNDRV_DEV_TYPE_XXX * @type: the device type, SNDRV_DEV_XXX
* @device_data: the data pointer of this device * @device_data: the data pointer of this device
* @ops: the operator table * @ops: the operator table
* *
...@@ -46,7 +46,9 @@ int snd_device_new(snd_card_t *card, snd_device_type_t type, ...@@ -46,7 +46,9 @@ int snd_device_new(snd_card_t *card, snd_device_type_t type,
{ {
snd_device_t *dev; snd_device_t *dev;
snd_assert(card != NULL && device_data != NULL && ops != NULL, return -ENXIO); snd_assert(card != NULL, return -ENXIO);
snd_assert(device_data != NULL, return -ENXIO);
snd_assert(ops != NULL, return -ENXIO);
dev = kcalloc(1, sizeof(*dev), GFP_KERNEL); dev = kcalloc(1, sizeof(*dev), GFP_KERNEL);
if (dev == NULL) if (dev == NULL)
return -ENOMEM; return -ENOMEM;
...@@ -102,7 +104,7 @@ int snd_device_free(snd_card_t *card, void *device_data) ...@@ -102,7 +104,7 @@ int snd_device_free(snd_card_t *card, void *device_data)
} }
/** /**
* snd_device_free - disconnect the device * snd_device_disconnect - disconnect the device
* @card: the card instance * @card: the card instance
* @device_data: the data pointer to disconnect * @device_data: the data pointer to disconnect
* *
...@@ -155,7 +157,8 @@ int snd_device_register(snd_card_t *card, void *device_data) ...@@ -155,7 +157,8 @@ int snd_device_register(snd_card_t *card, void *device_data)
snd_device_t *dev; snd_device_t *dev;
int err; int err;
snd_assert(card != NULL && device_data != NULL, return -ENXIO); snd_assert(card != NULL, return -ENXIO);
snd_assert(device_data != NULL, return -ENXIO);
list_for_each(list, &card->devices) { list_for_each(list, &card->devices) {
dev = snd_device(list); dev = snd_device(list);
if (dev->device_data != device_data) if (dev->device_data != device_data)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment