aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/riptide/riptide.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-07-17 08:53:56 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-07-17 08:53:56 -0700
commit8e3b3bb5e5ac064f83a8556100f10b7dfa1c719b (patch)
tree34b84efc765807eadeaa4475a5fdf036a6c6f327 /sound/pci/riptide/riptide.c
parent301d95c4dade09388f94258ee797d2d650dc00b5 (diff)
parent15c2ac051c730210b7ef2c93807b576e89e129d2 (diff)
downloadkernel_samsung_smdk4412-8e3b3bb5e5ac064f83a8556100f10b7dfa1c719b.tar.gz
kernel_samsung_smdk4412-8e3b3bb5e5ac064f83a8556100f10b7dfa1c719b.tar.bz2
kernel_samsung_smdk4412-8e3b3bb5e5ac064f83a8556100f10b7dfa1c719b.zip
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: ALSA: riptide - proper handling of pci_register_driver for joystick sound: usb-audio: add workaround for Blue Microphones devices ALSA: hda_intel: more strict alc880_parse_auto_config dig_nid checking ASoC: Fix NULL pointer dereference in __pxa2xx_pcm_hw_free
Diffstat (limited to 'sound/pci/riptide/riptide.c')
-rw-r--r--sound/pci/riptide/riptide.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sound/pci/riptide/riptide.c b/sound/pci/riptide/riptide.c
index 235a71e5ac8..b5ca02e2038 100644
--- a/sound/pci/riptide/riptide.c
+++ b/sound/pci/riptide/riptide.c
@@ -2197,9 +2197,12 @@ static int __init alsa_card_riptide_init(void)
if (err < 0)
return err;
#if defined(SUPPORT_JOYSTICK)
- pci_register_driver(&joystick_driver);
+ err = pci_register_driver(&joystick_driver);
+ /* On failure unregister formerly registered audio driver */
+ if (err < 0)
+ pci_unregister_driver(&driver);
#endif
- return 0;
+ return err;
}
static void __exit alsa_card_riptide_exit(void)