On Tue, Apr 30, 2019 at 12:44:55PM +0200, Miroslav Benes wrote: > On Tue, 30 Apr 2019, Greg Kroah-Hartman wrote: > > > On Tue, Apr 30, 2019 at 10:15:33AM +1000, Tobin C. Harding wrote: > > > Currently error return from kobject_init_and_add() is not followed by a > > > call to kobject_put(). This means there is a memory leak. > > > > > > Add call to kobject_put() in error path of kobject_init_and_add(). > > > > > > Signed-off-by: Tobin C. Harding <tobin@xxxxxxxxxx> > > > > Reviewed-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> > > Well, it does not even compile... My apologies, I did compile this but obviously I don't know how to configure the kernel. Thanks for the review. Tobin