Commit a5a3973da8b52944bc5909852714e55771c31ce7
Committed by
Takashi Iwai
1 parent
96b6359779
Exists in
master
and in
4 other branches
ALSA: azt3328 - adjust error handling code to include debugging code
snd_azf3328_dbgcallenter is called at the very beginning of the function, so it could be useful to call snd_azf3328_dbgcallleave at all exit points. Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Showing 1 changed file with 7 additions and 4 deletions Side-by-side Diff
sound/pci/azt3328.c
... | ... | @@ -2625,16 +2625,19 @@ |
2625 | 2625 | int err; |
2626 | 2626 | |
2627 | 2627 | snd_azf3328_dbgcallenter(); |
2628 | - if (dev >= SNDRV_CARDS) | |
2629 | - return -ENODEV; | |
2628 | + if (dev >= SNDRV_CARDS) { | |
2629 | + err = -ENODEV; | |
2630 | + goto out; | |
2631 | + } | |
2630 | 2632 | if (!enable[dev]) { |
2631 | 2633 | dev++; |
2632 | - return -ENOENT; | |
2634 | + err = -ENOENT; | |
2635 | + goto out; | |
2633 | 2636 | } |
2634 | 2637 | |
2635 | 2638 | err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); |
2636 | 2639 | if (err < 0) |
2637 | - return err; | |
2640 | + goto out; | |
2638 | 2641 | |
2639 | 2642 | strcpy(card->driver, "AZF3328"); |
2640 | 2643 | strcpy(card->shortname, "Aztech AZF3328 (PCI168)"); |