diff options
author | William Lee Irwin III <wli@holomorphy.com> | 2004-06-17 18:10:43 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-06-17 18:10:43 -0700 |
commit | 67fdb65157159f4b0c9925c65a31d84cd3e52c68 (patch) | |
tree | 7e6dcb88769739f0fa86c8f1d2ed5d703289dd58 /sound | |
parent | 16cc0fe9eba91d3f783f9976e7b188aced197b3e (diff) | |
download | history-67fdb65157159f4b0c9925c65a31d84cd3e52c68.tar.gz |
[PATCH] unregister driver if probing fails in sb_card.c
* Unregister driver if probing fails in sound/oss/sb_card.c
This fixes Debian BTS #218845.
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=218845
From: Robin Gerard <robin.jag@free.fr>
To: submit@bugs.debian.org
Subject: no sound with kernel-image-2.6.0-test9-1-386
Message-ID: <20031103004939.GA2071@mauritius>
I downlaoded the kernel-image-2.6.0-test9-1-386_2.6.0-test9-1_i386.deb
and I installed it successfully. Everything works fine, except the sound.
(I run also the kernel-image-2.4.20 and the sound is ok with this kernel)
My sound card is a sb.
First I launched modconf but no module was displayed.
I did: modprobe sb
and I got:
sb: Init: Done
sb: Init: Starting Probe...
kobject_register failed for OSS SndBlstr (-17)
Call Trace:
[<c0191cda>] kobject_register+0x3a/0x40
[<c01d9bcc>] bus_add_driver+0x30/0x64
[<c01d9e51>] driver_register+0x2d/0x34
[<c011a24a>] preempt_schedule+0x2a/0x48
[<c01b6f84>] pnp_register_driver+0x28/0x58
[<c01b6c5e>] pnp_register_card_driver+0x5e/0x98
[<c488f063>] sb_init+0x63/0xb5 [sb]
[<c0130bf4>] sys_init_module+0xe8/0x1f0
[<c010b577>] syscall_call+0x7/0xb
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/oss/sb_card.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sound/oss/sb_card.c b/sound/oss/sb_card.c index b5f5ecbf25a95d..012f6d2d88de90 100644 --- a/sound/oss/sb_card.c +++ b/sound/oss/sb_card.c @@ -309,7 +309,13 @@ static int __init sb_init(void) /* If either PnP or Legacy registered a card then return * success */ - return (pres > 0 || lres > 0) ? 0 : -ENODEV; + if (pres <= 0 && lres <= 0) { +#ifdef CONFIG_PNP + pnp_unregister_card_driver(&sb_pnp_driver); +#endif + return -ENODEV; + } + return 0; } static void __exit sb_exit(void) |