Skip to content

Commit 74c3dea

Browse files
committed
params: suppress unused variable error, warn once just in case code changes.
It shouldn't fail due to OOM (it's boot time), and already warns if we get two identical names. But you never know what the future holds, and WARN_ON_ONCE() keeps gcc happy with minimal code. Reported-by: Louis Langholtz <lou_langholtz@me.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
1 parent b6c09b5 commit 74c3dea

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎kernel/params.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -884,6 +884,7 @@ static void __init version_sysfs_builtin(void)
884884
mk = locate_module_kobject(vattr->module_name);
885885
if (mk) {
886886
err = sysfs_create_file(&mk->kobj, &vattr->mattr.attr);
887+
WARN_ON_ONCE(err);
887888
kobject_uevent(&mk->kobj, KOBJ_ADD);
888889
kobject_put(&mk->kobj);
889890
}

0 commit comments

Comments
 (0)