Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kobject_init_and_add() takes reference even when it fails. According to the doc of kobject_init_and_add() If this function returns an error, kobject_put() must be called to properly clean up the memory associated with the object. Fix this by calling kobject_put() when kobject_init_and_add() fails. Fixes: b2ed215 ("Kobject: change drivers/edac to use kobject_init_and_add") Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
- Loading branch information