summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2015-06-16 22:46:52 +0200
committerRusty Russell <rusty@rustcorp.com.au>2015-06-23 07:57:37 +0200
commit74c3dea355245c17ee407a3ce3ea34f55b40f2eb (patch)
treeca68b882f14d82c132395e165c303782ed32e220 /kernel
parentmodules: clarify CONFIG_MODULE_COMPRESS help, suggest 'N'. (diff)
downloadlinux-74c3dea355245c17ee407a3ce3ea34f55b40f2eb.tar.xz
linux-74c3dea355245c17ee407a3ce3ea34f55b40f2eb.zip
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>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/params.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/params.c b/kernel/params.c
index 7edf31f2ce96..e906874da5fc 100644
--- a/kernel/params.c
+++ b/kernel/params.c
@@ -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);
}