mirror of
https://github.com/sysprog21/lkmpg.git
synced 2024-11-22 06:35:42 +08:00
Merge pull request #280 from NOVBobLee/fix_err_handle
Fix missing function call in error handling path
This commit is contained in:
commit
9c39011c21
|
@ -42,6 +42,7 @@ static int __init mymodule_init(void)
|
||||||
|
|
||||||
error = sysfs_create_file(mymodule, &myvariable_attribute.attr);
|
error = sysfs_create_file(mymodule, &myvariable_attribute.attr);
|
||||||
if (error) {
|
if (error) {
|
||||||
|
kobject_put(mymodule);
|
||||||
pr_info("failed to create the myvariable file "
|
pr_info("failed to create the myvariable file "
|
||||||
"in /sys/kernel/mymodule\n");
|
"in /sys/kernel/mymodule\n");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user