* [ALSA][6/6] Don't leave crap in /sys after module exit.
@ 2004-03-15 19:27 davej
0 siblings, 0 replies; only message in thread
From: davej @ 2004-03-15 19:27 UTC (permalink / raw)
To: linux-kernel
Here's a fun one. modprobe snd_dt019x.c when you don't have the hardware.
It fails to detect as expected, but doesn't stay around, so you don't
even need to rmmod it afterwards. Unfortunatly, it leaves around crap
in /sys/bus/pnp/drivers/dt019x which buggers up any subsequent usage of
the pnp code. Fix is easy : Keep the module around even when things fail.
Dave
--- linux-2.6.4/sound/isa/dt019x.c~ 2004-03-15 18:56:08.000000000 +0000
+++ linux-2.6.4/sound/isa/dt019x.c 2004-03-15 19:01:39.000000000 +0000
@@ -325,7 +325,7 @@
if (!cards)
snd_printk(KERN_ERR "no DT-019X / ALS-007 based soundcards found\n");
#endif
- return cards ? 0 : -ENODEV;
+ return cards < 0 ? cards : 0;
}
static void __exit alsa_card_dt019x_exit(void)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-03-15 19:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-15 19:27 [ALSA][6/6] Don't leave crap in /sys after module exit davej
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®