diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2022-12-02 12:38:50 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-12-02 19:48:04 +0300 |
commit | 728ac3389296caf68638628c987aeae6c8851e2d (patch) | |
tree | 9fff60399075485ff9f2c20a605e0ce0cb7f6646 /fs/direct-io.c | |
parent | d7237462561fcd224fa687c56ccb68629f50fc0d (diff) | |
download | linux-728ac3389296caf68638628c987aeae6c8851e2d.tar.xz |
mcb: mcb-parse: fix error handing in chameleon_parse_gdd()
If mcb_device_register() returns error in chameleon_parse_gdd(), the refcount
of bus and device name are leaked. Fix this by calling put_device() to give up
the reference, so they can be released in mcb_release_dev() and kobject_cleanup().
Fixes: 3764e82e5150 ("drivers: Introduce MEN Chameleon Bus")
Reviewed-by: Johannes Thumshirn <jth@kernel.org>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Johannes Thumshirn <jth@kernel.org>
Link: https://lore.kernel.org/r/ebfb06e39b19272f0197fa9136b5e4b6f34ad732.1669624063.git.johannes.thumshirn@wdc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/direct-io.c')
0 files changed, 0 insertions, 0 deletions