projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f3686e5
)
mcb: mcb-parse: fix error handing in chameleon_parse_gdd()
author
Yang Yingliang
<yangyingliang@huawei.com>
Fri, 2 Dec 2022 09:38:50 +0000
(
01:38
-0800)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:14:30 +0000
(13:14 +0100)
[ 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>
drivers/mcb/mcb-parse.c
patch
|
blob
|
history
diff --git
a/drivers/mcb/mcb-parse.c
b/drivers/mcb/mcb-parse.c
index
0266bfd
..
aa6938d
100644
(file)
--- a/
drivers/mcb/mcb-parse.c
+++ b/
drivers/mcb/mcb-parse.c
@@
-108,7
+108,7
@@
static int chameleon_parse_gdd(struct mcb_bus *bus,
return 0;
err:
-
mcb_free_dev(m
dev);
+
put_device(&mdev->
dev);
return ret;
}