mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-03-22 07:27:12 +08:00
char: misc: Rename a local variable in misc_init()
Local variable @ret is not used for return value in misc_init(). Give it a different name @misc_proc_file. Signed-off-by: Zijun Hu <zijun.hu@oss.qualcomm.com> Link: https://lore.kernel.org/r/20250625-fix_mischar-v2-1-25a80f41b090@oss.qualcomm.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
bd80e3ccd6
commit
626e89412d
@@ -289,9 +289,9 @@ EXPORT_SYMBOL(misc_deregister);
|
||||
static int __init misc_init(void)
|
||||
{
|
||||
int err;
|
||||
struct proc_dir_entry *ret;
|
||||
struct proc_dir_entry *misc_proc_file;
|
||||
|
||||
ret = proc_create_seq("misc", 0, NULL, &misc_seq_ops);
|
||||
misc_proc_file = proc_create_seq("misc", 0, NULL, &misc_seq_ops);
|
||||
err = class_register(&misc_class);
|
||||
if (err)
|
||||
goto fail_remove;
|
||||
@@ -305,7 +305,7 @@ fail_printk:
|
||||
pr_err("unable to get major %d for misc devices\n", MISC_MAJOR);
|
||||
class_unregister(&misc_class);
|
||||
fail_remove:
|
||||
if (ret)
|
||||
if (misc_proc_file)
|
||||
remove_proc_entry("misc", NULL);
|
||||
return err;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user