kobject_add increments the parent kobj refcount, but forget to release it after err return, it will lead to a memory leak. Lin Yi (2): block :blk-sysfs :fix kobj refcount imbalance on the err return path block :blk-mq-sysfs :fix kobj refcount imbalance on err return path block/blk-mq-sysfs.c | 4 +++- block/blk-sysfs.c | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) -- 1.9.1