kobject: Improve doc clarity kobject_init_and_add()

Function kobject_init_and_add() is currently misused in a number of
places in the kernel.  On error return kobject_put() must be called but
is at times not.

Make the function documentation more explicit about calling
kobject_put() in the error path.

Signed-off-by: Tobin C. Harding <tobin@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Tobin C. Harding 2019-04-28 09:56:52 +10:00 • committed by Greg Kroah-Hartman
commit 1fd7c3b438