From: Pete Batard Date: Sat, 7 Nov 2015 18:14:21 +0000 (+0000) Subject: Remove uneeded calls to class_unregister X-Git-Url: https://git.halfball.org/?a=commitdiff_plain;h=162a1dd71eb2faa48d7aadf6ccc8acb87d7f2c12;p=parrot.git Remove uneeded calls to class_unregister * As shown by http://lxr.free-electrons.com/source/drivers/base/class.c?v=3.16#L273 class_destroy() does call class_unregister() --- diff --git a/parrot_driver.c b/parrot_driver.c index 4a937a6..4451289 100644 --- a/parrot_driver.c +++ b/parrot_driver.c @@ -217,7 +217,6 @@ static int __init parrot_module_init(void) return 0; failed_devreg: - class_unregister(parrot_class); class_destroy(parrot_class); failed_classreg: unregister_chrdev(parrot_major, DEVICE_NAME); @@ -231,7 +230,6 @@ static void __exit parrot_module_exit(void) device_remove_file(parrot_device, &dev_attr_fifo); device_remove_file(parrot_device, &dev_attr_reset); device_destroy(parrot_class, MKDEV(parrot_major, 0)); - class_unregister(parrot_class); class_destroy(parrot_class); unregister_chrdev(parrot_major, DEVICE_NAME); }