diff options
author | Paul Mundt <lethal@linux-sh.org> | 2011-06-14 06:15:49 (GMT) |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2011-06-14 06:15:49 (GMT) |
commit | 9aa7719e0c6a1580451900e672744752804f8f75 (patch) | |
tree | ba36c5536342db2759d0a1843dffd0c193e26ff0 /sound/pci/fm801.c | |
parent | 583af252ab07cd1e8721878463da5b7016c18fdc (diff) | |
parent | 2c53b436a30867eb6b47dd7bab23ba638d1fb0d2 (diff) | |
download | linux-9aa7719e0c6a1580451900e672744752804f8f75.tar.xz |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into sh-fixes-for-linus
Diffstat (limited to 'sound/pci/fm801.c')
-rw-r--r-- | sound/pci/fm801.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/sound/pci/fm801.c b/sound/pci/fm801.c index eacd490..a7ec703 100644 --- a/sound/pci/fm801.c +++ b/sound/pci/fm801.c @@ -1234,9 +1234,12 @@ static int __devinit snd_fm801_create(struct snd_card *card, sprintf(chip->tea.bus_info, "PCI:%s", pci_name(pci)); if ((tea575x_tuner & TUNER_TYPE_MASK) > 0 && (tea575x_tuner & TUNER_TYPE_MASK) < 4) { - if (snd_tea575x_init(&chip->tea)) + if (snd_tea575x_init(&chip->tea)) { snd_printk(KERN_ERR "TEA575x radio not found\n"); - } else if ((tea575x_tuner & TUNER_TYPE_MASK) == 0) + snd_fm801_free(chip); + return -ENODEV; + } + } else if ((tea575x_tuner & TUNER_TYPE_MASK) == 0) { /* autodetect tuner connection */ for (tea575x_tuner = 1; tea575x_tuner <= 3; tea575x_tuner++) { chip->tea575x_tuner = tea575x_tuner; @@ -1246,6 +1249,12 @@ static int __devinit snd_fm801_create(struct snd_card *card, break; } } + if (tea575x_tuner == 4) { + snd_printk(KERN_ERR "TEA575x radio not found\n"); + snd_fm801_free(chip); + return -ENODEV; + } + } strlcpy(chip->tea.card, snd_fm801_tea575x_gpios[(tea575x_tuner & TUNER_TYPE_MASK) - 1].name, sizeof(chip->tea.card)); #endif |