On Mon, Sep 21, 2020 at 10:27:06PM +0300, Jarkko Sakkinen wrote: > 'sgx_dev_enclave' is successfully register whenever that happens. Am I > missing something here? No, I was missing the fact that you have *two* misc devices and you're deregistering the first one in the error path of the second. Forget what I said. ;-\ -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette