Merge pull request #280 from NOVBobLee/fix_err_handle
Some checks failed
build-deploy-assets / build (push) Has been cancelled
deploy-github-page / build (push) Has been cancelled
status-checks / validate (push) Has been cancelled

Fix missing function call in error handling path
This commit is contained in:
Jim Huang 2024-11-05 20:35:58 +08:00 committed by GitHub
commit 9c39011c21
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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");
} }