kobject: fix kset sample error path
authorBjorn Helgaas <bhelgaas@google.com>
Tue, 8 Oct 2013 20:20:24 +0000 (14:20 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Dec 2013 18:13:30 +0000 (10:13 -0800)
Previously, example_init() leaked a kset if any of the object creations
failed.  This fixes the leak by calling kset_unregister() in the error
path.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

No differences found