X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sound%2Foss%2Fsb_card.c;h=012f6d2d88de9037300dd6f4a7d958cec30283c9;hb=9bf4aaab3e101692164d49b7ca357651eb691cb6;hp=b5f5ecbf25a95d9de93052e904de489b761a35cc;hpb=db216c3d5e4c040e557a50f8f5d35d5c415e8c1c;p=linux-2.6.git diff --git a/sound/oss/sb_card.c b/sound/oss/sb_card.c index b5f5ecbf2..012f6d2d8 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)