Skip to content

Commit

Permalink
PowerCap: Fix build error with option -Werror=format-security
Browse files Browse the repository at this point in the history
Fix compile error with gcc option: -Werror=format-security for
dev_set_name(&control_type->dev, name).

Changed to dev_set_name(&control_type->dev, "%s", name).

Signed-off-by: Srinivas Pandruvada <[email protected]>
Acked-by: Kees Cook <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
  • Loading branch information
spandruvada authored and rafaeljw committed Nov 5, 2013
1 parent 9e3410b commit 08ff4cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/powercap/powercap_sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ struct powercap_control_type *powercap_register_control_type(
control_type->ops = ops;
INIT_LIST_HEAD(&control_type->node);
control_type->dev.class = &powercap_class;
dev_set_name(&control_type->dev, name);
dev_set_name(&control_type->dev, "%s", name);
result = device_register(&control_type->dev);
if (result) {
if (control_type->allocated)
Expand Down

0 comments on commit 08ff4cb

Please sign in to comment.