mirror of
https://github.com/torvalds/linux.git
synced 2026-11-30 02:23:05 +00:00
kobject_init_and_add() takes reference even when it fails. If this function returns an error, kobject_put() must be called to properly clean up the memory associated with the object. Previous commit "b8eb718348b8" fixed a similar problem. Signed-off-by: Qiushi Wu <[email protected]> [ rjw: Subject ] Signed-off-by: Rafael J. Wysocki <[email protected]>