- 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