Messages in this thread | | | From | "Luck, Tony" <> | Subject | RE: [PATCH] x86, mce: Print warning if MCE handler fails to register /dev/mcelog | Date | Tue, 9 Apr 2013 18:30:58 +0000 |
| |
- misc_register(&mce_chrdev_device); + if (misc_register(&mce_chrdev_device) != 0) + pr_warn("Failed to register mcelog device\n");
Did this actually happen to you? Or is this just "good practice" to check the return value from misc_register?
If this can really happen, we should remember that it failed and just drop out of mce_log() early (no point in queueing up records when there is no way for a user to ever access them).
-Tony
| |