staging: lustre: osc: tidy up osc_init()
commite67f133d02e78c0c5e7c46ca84996aad3b25d8d1
authorNeilBrown <neilb@suse.com>
Mon, 21 May 2018 04:35:12 +0000 (21 14:35 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 May 2018 16:29:09 +0000 (25 18:29 +0200)
tree2a460b72f1efa0499c1a57704969ca2dd194317c
parent03f17b5d40c41da65788e6b7713e05ab4828becc
staging: lustre: osc: tidy up osc_init()

A module_init() function that registers the services
of the module should do that last, after all other
initialization has succeeded.
This patch moves the class_register_type() call to the
end and ensures everything else that might have been
set up, is cleaned up on error.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/osc/osc_request.c