Skip to content

Commit

Permalink
powercap: Simplify powercap_init()
Browse files Browse the repository at this point in the history
Simplify powercap_init() by reducing the number of redundant
assignments in it.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
[ rjw: Subject+changelog ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
ArvindYadavCs authored and rafaeljw committed Dec 7, 2017
1 parent ae64f9b commit 7f63448
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/powercap/powercap_sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -673,15 +673,13 @@ EXPORT_SYMBOL_GPL(powercap_unregister_control_type);

static int __init powercap_init(void)
{
int result = 0;
int result;

result = seed_constraint_attributes();
if (result)
return result;

result = class_register(&powercap_class);

return result;
return class_register(&powercap_class);
}

device_initcall(powercap_init);
Expand Down

0 comments on commit 7f63448

Please sign in to comment.