diff options
| author | Yuho Choi <dbgh9129@gmail.com> | 2026-06-08 13:27:17 -0400 |
|---|---|---|
| committer | Danilo Krummrich <dakr@kernel.org> | 2026-07-18 16:07:22 +0200 |
| commit | 8cfe7ad274bb42c4653b645267410d4a3a23db98 (patch) | |
| tree | 76b22bc41e34feb6c7e51aa168c1e5a00d721b24 /tools/perf/scripts/python/stackcollapse.py | |
| parent | 6e328b4a208f7a06df3c1df18d7645c74c90f5f3 (diff) | |
driver core: attribute_container: Unwind device_add() on attr failure
attribute_container_add_class_device() first calls device_add() and then
creates the container attributes. If attribute_container_add_attrs() fails,
the helper returns the error with the class device still registered.
Callers use an error from this helper as a failed add and do not call
device_del() on that path. Undo the successful device_add() before
returning the attribute creation error.
Signed-off-by: Yuho Choi <dbgh9129@gmail.com>
Link: https://patch.msgid.link/20260608172717.88657-1-dbgh9129@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
