kobjects: don't do cleanup if kobject_add() fails.
kobject_register() has the rude behavior that it will attempt to clean up the kobject if kobject_add() fails. This replaces that with a WARN_ON() for the return value, and leaves the cleanup to the caller.
Showing
Please register or sign in to comment