提交 74c3dea3 编写于 作者: R Rusty Russell

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: NLouis Langholtz <lou_langholtz@me.com>
Acked-by: NTejun Heo <tj@kernel.org>
Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
上级 b6c09b51
......@@ -884,6 +884,7 @@ static void __init version_sysfs_builtin(void)
mk = locate_module_kobject(vattr->module_name);
if (mk) {
err = sysfs_create_file(&mk->kobj, &vattr->mattr.attr);
WARN_ON_ONCE(err);
kobject_uevent(&mk->kobj, KOBJ_ADD);
kobject_put(&mk->kobj);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册