powercap: Simplify powercap_init()

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>
This commit is contained in:
Arvind Yadav 2017-11-11 23:17:26 +05:30 committed by Rafael J. Wysocki
parent ae64f9bd1d
commit 7f6344896d

View File

@ -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);