We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e3e2ee3 + 620bb0f commit 9c39011Copy full SHA for 9c39011
examples/hello-sysfs.c
@@ -42,6 +42,7 @@ static int __init mymodule_init(void)
42
43
error = sysfs_create_file(mymodule, &myvariable_attribute.attr);
44
if (error) {
45
+ kobject_put(mymodule);
46
pr_info("failed to create the myvariable file "
47
"in /sys/kernel/mymodule\n");
48
}
0 commit comments