diff options
author | Yang Yingliang | 2022-12-02 01:38:50 -0800 |
---|---|---|
committer | Greg Kroah-Hartman | 2022-12-31 13:32:41 +0100 |
commit | 4a9f1a8b3af287581ffb690d0e1593c681729ddb (patch) | |
tree | f2a6152379ee74b8bcb70251518ff2c99125f1b2 /fs | |
parent | 0468a585710bbb807a1b9c31df54bcf564d28b2b (diff) |
mcb: mcb-parse: fix error handing in chameleon_parse_gdd()
[ Upstream commit 728ac3389296caf68638628c987aeae6c8851e2d ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs')
0 files changed, 0 insertions, 0 deletions