Skip to content

Commit

Permalink
params: suppress unused variable error, warn once just in case code c…
Browse files Browse the repository at this point in the history
…hanges.

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 <[email protected]>
Acked-by: Tejun Heo <[email protected]>
Signed-off-by: Rusty Russell <[email protected]>
  • Loading branch information
rustyrussell committed Jun 23, 2015
1 parent b6c09b5 commit 74c3dea
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions kernel/params.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 74c3dea

Please sign in to comment.