Skip to content

Commit

Permalink
[ALSA] Fix two typos and changes on snd_assert()
Browse files Browse the repository at this point in the history
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: Henrik Kretzschmar <henne@nachtwindheim.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Henrik Kretzschmar authored and Jaroslav Kysela committed Jul 28, 2005
1 parent 7a318a7 commit a3352f0
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions sound/core/device.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
/**
* snd_device_new - create an ALSA device component
* @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
* @ops: the operator table
*
Expand All @@ -46,7 +46,9 @@ int snd_device_new(snd_card_t *card, snd_device_type_t type,
{
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);
if (dev == NULL)
return -ENOMEM;
Expand Down Expand Up @@ -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
* @device_data: the data pointer to disconnect
*
Expand All @@ -118,7 +120,7 @@ int snd_device_disconnect(snd_card_t *card, void *device_data)
{
struct list_head *list;
snd_device_t *dev;

snd_assert(card != NULL, return -ENXIO);
snd_assert(device_data != NULL, return -ENXIO);
list_for_each(list, &card->devices) {
Expand Down Expand Up @@ -154,8 +156,9 @@ int snd_device_register(snd_card_t *card, void *device_data)
struct list_head *list;
snd_device_t *dev;
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) {
dev = snd_device(list);
if (dev->device_data != device_data)
Expand Down

0 comments on commit a3352f0

Please sign in to comment.