git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
VServer 1.9.2 (patch-2.6.8.1-vs1.9.2.diff)
[linux-2.6.git]
/
sound
/
oss
/
sb_card.c
diff --git
a/sound/oss/sb_card.c
b/sound/oss/sb_card.c
index
b5f5ecb
..
012f6d2
100644
(file)
--- 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 */
/* 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)
}
static void __exit sb_exit(void)