aboutsummaryrefslogtreecommitdiff
path: root/sound/ppc/powermac.c
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2006-08-14 15:33:54 -0400
committerJohn W. Linville <linville@tuxdriver.com>2006-08-14 15:33:54 -0400
commite9ffb3d7ec94083a44a8721681391beca2ffd68c (patch)
tree6768ab487b3f44c2a4995ee61307e47760ca9b88 /sound/ppc/powermac.c
parent8b9411014e6f18a883c18b38f41338dbd53fddea (diff)
parente9fa4f7bd291c29a785666e2fa5a9cf3241ee6c3 (diff)
Merge branch 'from-linus' into upstream
Diffstat (limited to 'sound/ppc/powermac.c')
-rw-r--r--sound/ppc/powermac.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/sound/ppc/powermac.c b/sound/ppc/powermac.c
index fa9a44ab487..2264574fa06 100644
--- a/sound/ppc/powermac.c
+++ b/sound/ppc/powermac.c
@@ -181,21 +181,14 @@ static int __init alsa_card_pmac_init(void)
if ((err = platform_driver_register(&snd_pmac_driver)) < 0)
return err;
device = platform_device_register_simple(SND_PMAC_DRIVER, -1, NULL, 0);
- if (!IS_ERR(device)) {
- if (platform_get_drvdata(device))
- return 0;
- platform_device_unregister(device);
- err = -ENODEV;
- } else
- err = PTR_ERR(device);
- platform_driver_unregister(&snd_pmac_driver);
- return err;
+ return 0;
}
static void __exit alsa_card_pmac_exit(void)
{
- platform_device_unregister(device);
+ if (!IS_ERR(device))
+ platform_device_unregister(device);
platform_driver_unregister(&snd_pmac_driver);
}