X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=sound%2Fppc%2Fpowermac.c;h=2264574fa06b7c317252653f75068f5e841a6235;hb=29756fa3287ff702535e459e7ca8c6038f6e9ae3;hp=fa9a44ab487e8a35a46e0a4086849943719c5f5f;hpb=45c091bb2d453ce4a8b06cf19872ec7a77fc4799;p=powerpc.git diff --git a/sound/ppc/powermac.c b/sound/ppc/powermac.c index fa9a44ab48..2264574fa0 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); }