diff options
| author | 2026-08-28 16:27:34 +0700 | |
|---|---|---|
| committer | 2026-09-04 11:01:47 +0200 | |
| commit | e0bec04067a9196ab27e9237fd605fdb4a688c7f (patch) | |
| tree | 444478941a1e4246041a3cb1c323137b8ea701e9 /scripts/Makefile.thinlto | |
| parent | selftests/pidfd: fix PPID values in error message (diff) | |
chardev: check return value of kobject_set_name() in __register_chrdev()
The kobject_set_name() function can fail and return -ENOMEM if memory
allocation fails.
While all other functions called inside __register_chrdev() are properly
checked for errors, kobject_set_name() was missing this check. Add the
error check for kobject_set_name() and jump to the 'out' label on failure
to maintain consistency and ensure proper error handling.
Found by manual code inspection.
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260828092734.600911-1-phucduc.bui@gmail.com
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
