diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-11 12:16:54 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-11 12:16:54 -0400 |
commit | d3570a5a7b8d0604fa012129f92637dc1534f62c (patch) | |
tree | 15d290595c363a2bdd4f4d6b3a2f7433e6e48f6d /sound/core/info.c | |
parent | 37d9869ed928268409b48f52c57449918c0fd307 (diff) | |
parent | 72474be62d6ec2e0337ff01ecbd737f9c5c242c7 (diff) |
Merge branch 'for-linus' of git://git.alsa-project.org/alsa-kernel
* 'for-linus' of git://git.alsa-project.org/alsa-kernel: (258 commits)
ALSA: hda: VREF powerdown for headphones
ALSA: hda: STAC_HP_M4
ALSA: ASoC: Check for machine type in GTA01 machine driver
ALSA: mtpav - Fix race in probe
ALSA: usb-audio: dynamic detection of MIDI interfaces in uaxx-quirk
ALSA: Add a note on dependency of RTC stuff
ALSA: ASoC: add new param mux to dapm_mux_update_power
ALSA: Increase components array size
ALSA: ASoC: Correct inverted Mic PGA Switch control in wm8510 driver
ALSA: hda: comment typo fix
ALSA: hda: comment typo fix
ALSA: hda - Fix PCI SSID for ASROCK K18N78FullHD-hSLI
ALSA: snd-usb-audio: support for Edirol UA-4FX device
ALSA: usb - Fix possible Oops at USB-MIDI disconnection
ALSA: hda - Fix another ALC889A (rev 0x100101)
ALSA: hda: add more board-specific information for Realtek ALC662 rev1
ALSA: Correct Vladimir Barinov's e-mail address
ALSA: cs46xx: Add PCI IDs for TerraTec and Hercules cards
ALSA: hda: SPDIF stream muting support
ALSA: hda: appletv support
...
Diffstat (limited to 'sound/core/info.c')
-rw-r--r-- | sound/core/info.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/sound/core/info.c b/sound/core/info.c index c67773ad9298..527b207462b0 100644 --- a/sound/core/info.c +++ b/sound/core/info.c | |||
@@ -217,7 +217,8 @@ static ssize_t snd_info_entry_read(struct file *file, char __user *buffer, | |||
217 | loff_t pos; | 217 | loff_t pos; |
218 | 218 | ||
219 | data = file->private_data; | 219 | data = file->private_data; |
220 | snd_assert(data != NULL, return -ENXIO); | 220 | if (snd_BUG_ON(!data)) |
221 | return -ENXIO; | ||
221 | pos = *offset; | 222 | pos = *offset; |
222 | if (pos < 0 || (long) pos != pos || (ssize_t) count < 0) | 223 | if (pos < 0 || (long) pos != pos || (ssize_t) count < 0) |
223 | return -EIO; | 224 | return -EIO; |
@@ -258,7 +259,8 @@ static ssize_t snd_info_entry_write(struct file *file, const char __user *buffer | |||
258 | loff_t pos; | 259 | loff_t pos; |
259 | 260 | ||
260 | data = file->private_data; | 261 | data = file->private_data; |
261 | snd_assert(data != NULL, return -ENXIO); | 262 | if (snd_BUG_ON(!data)) |
263 | return -ENXIO; | ||
262 | entry = data->entry; | 264 | entry = data->entry; |
263 | pos = *offset; | 265 | pos = *offset; |
264 | if (pos < 0 || (long) pos != pos || (ssize_t) count < 0) | 266 | if (pos < 0 || (long) pos != pos || (ssize_t) count < 0) |
@@ -614,7 +616,8 @@ int snd_info_card_create(struct snd_card *card) | |||
614 | char str[8]; | 616 | char str[8]; |
615 | struct snd_info_entry *entry; | 617 | struct snd_info_entry *entry; |
616 | 618 | ||
617 | snd_assert(card != NULL, return -ENXIO); | 619 | if (snd_BUG_ON(!card)) |
620 | return -ENXIO; | ||
618 | 621 | ||
619 | sprintf(str, "card%i", card->number); | 622 | sprintf(str, "card%i", card->number); |
620 | if ((entry = snd_info_create_module_entry(card->module, str, NULL)) == NULL) | 623 | if ((entry = snd_info_create_module_entry(card->module, str, NULL)) == NULL) |
@@ -636,7 +639,8 @@ int snd_info_card_register(struct snd_card *card) | |||
636 | { | 639 | { |
637 | struct proc_dir_entry *p; | 640 | struct proc_dir_entry *p; |
638 | 641 | ||
639 | snd_assert(card != NULL, return -ENXIO); | 642 | if (snd_BUG_ON(!card)) |
643 | return -ENXIO; | ||
640 | 644 | ||
641 | if (!strcmp(card->id, card->proc_root->name)) | 645 | if (!strcmp(card->id, card->proc_root->name)) |
642 | return 0; | 646 | return 0; |
@@ -654,7 +658,8 @@ int snd_info_card_register(struct snd_card *card) | |||
654 | */ | 658 | */ |
655 | void snd_info_card_disconnect(struct snd_card *card) | 659 | void snd_info_card_disconnect(struct snd_card *card) |
656 | { | 660 | { |
657 | snd_assert(card != NULL, return); | 661 | if (!card) |
662 | return; | ||
658 | mutex_lock(&info_mutex); | 663 | mutex_lock(&info_mutex); |
659 | if (card->proc_root_link) { | 664 | if (card->proc_root_link) { |
660 | snd_remove_proc_entry(snd_proc_root, card->proc_root_link); | 665 | snd_remove_proc_entry(snd_proc_root, card->proc_root_link); |
@@ -671,7 +676,8 @@ void snd_info_card_disconnect(struct snd_card *card) | |||
671 | */ | 676 | */ |
672 | int snd_info_card_free(struct snd_card *card) | 677 | int snd_info_card_free(struct snd_card *card) |
673 | { | 678 | { |
674 | snd_assert(card != NULL, return -ENXIO); | 679 | if (!card) |
680 | return 0; | ||
675 | snd_info_free_entry(card->proc_root); | 681 | snd_info_free_entry(card->proc_root); |
676 | card->proc_root = NULL; | 682 | card->proc_root = NULL; |
677 | return 0; | 683 | return 0; |
@@ -849,7 +855,7 @@ static void snd_info_disconnect(struct snd_info_entry *entry) | |||
849 | return; | 855 | return; |
850 | list_del_init(&entry->list); | 856 | list_del_init(&entry->list); |
851 | root = entry->parent == NULL ? snd_proc_root : entry->parent->p; | 857 | root = entry->parent == NULL ? snd_proc_root : entry->parent->p; |
852 | snd_assert(root, return); | 858 | snd_BUG_ON(!root); |
853 | snd_remove_proc_entry(root, entry->p); | 859 | snd_remove_proc_entry(root, entry->p); |
854 | entry->p = NULL; | 860 | entry->p = NULL; |
855 | } | 861 | } |
@@ -947,7 +953,8 @@ int snd_info_register(struct snd_info_entry * entry) | |||
947 | { | 953 | { |
948 | struct proc_dir_entry *root, *p = NULL; | 954 | struct proc_dir_entry *root, *p = NULL; |
949 | 955 | ||
950 | snd_assert(entry != NULL, return -ENXIO); | 956 | if (snd_BUG_ON(!entry)) |
957 | return -ENXIO; | ||
951 | root = entry->parent == NULL ? snd_proc_root : entry->parent->p; | 958 | root = entry->parent == NULL ? snd_proc_root : entry->parent->p; |
952 | mutex_lock(&info_mutex); | 959 | mutex_lock(&info_mutex); |
953 | p = snd_create_proc_entry(entry->name, entry->mode, root); | 960 | p = snd_create_proc_entry(entry->name, entry->mode, root); |