On Wed, Mar 3, 2010 at 5:08 PM, Américo Wang <xiyou.wangcong@gmail.com> wrote:
Here we go:
--------------------->
It looks really odd that we do class_put() in non-failure path of
__class_register(). This seems wrong.
To fix this, just remove class_get() in __class_register(), we don't need
to call class_get() to get ref of cls->p->class_subsys, because
kset_register() has already done this for us.
Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>