diff options
author | Paul Mackerras <paulus@samba.org> | 2006-08-08 03:09:11 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-08-08 03:09:11 -0400 |
commit | 32bc6e095d75233e7c87cc6fa0e07942b124d194 (patch) | |
tree | 8f83ef9a23d52d1305878b65dd98fc22b09b7f3e /sound/ppc/powermac.c | |
parent | 5cf13911b1e72707b6f0eb39b2d819ec6e343d76 (diff) | |
parent | 81b73dd92b97423b8f5324a59044da478c04f4c4 (diff) |
Merge branch 'merge'
Diffstat (limited to 'sound/ppc/powermac.c')
-rw-r--r-- | sound/ppc/powermac.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/sound/ppc/powermac.c b/sound/ppc/powermac.c index fa9a44ab487e..2264574fa06b 100644 --- a/sound/ppc/powermac.c +++ b/sound/ppc/powermac.c | |||
@@ -181,21 +181,14 @@ static int __init alsa_card_pmac_init(void) | |||
181 | if ((err = platform_driver_register(&snd_pmac_driver)) < 0) | 181 | if ((err = platform_driver_register(&snd_pmac_driver)) < 0) |
182 | return err; | 182 | return err; |
183 | device = platform_device_register_simple(SND_PMAC_DRIVER, -1, NULL, 0); | 183 | device = platform_device_register_simple(SND_PMAC_DRIVER, -1, NULL, 0); |
184 | if (!IS_ERR(device)) { | 184 | return 0; |
185 | if (platform_get_drvdata(device)) | ||
186 | return 0; | ||
187 | platform_device_unregister(device); | ||
188 | err = -ENODEV; | ||
189 | } else | ||
190 | err = PTR_ERR(device); | ||
191 | platform_driver_unregister(&snd_pmac_driver); | ||
192 | return err; | ||
193 | 185 | ||
194 | } | 186 | } |
195 | 187 | ||
196 | static void __exit alsa_card_pmac_exit(void) | 188 | static void __exit alsa_card_pmac_exit(void) |
197 | { | 189 | { |
198 | platform_device_unregister(device); | 190 | if (!IS_ERR(device)) |
191 | platform_device_unregister(device); | ||
199 | platform_driver_unregister(&snd_pmac_driver); | 192 | platform_driver_unregister(&snd_pmac_driver); |
200 | } | 193 | } |
201 | 194 | ||