summaryrefslogtreecommitdiff
path: root/drivers/powercap
diff options
context:
space:
mode:
authorArvind Yadav <arvind.yadav.cs@gmail.com>2017-11-11 23:17:26 +0530
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-12-07 23:26:44 +0100
commit7f6344896d3e5be3ccfef1c5c98ef24940e5f229 (patch)
treec665f040e50d890d1e34afef8d2a6ff36c66739c /drivers/powercap
parentae64f9bd1d3621b5e60d7363bc20afb46aede215 (diff)
downloadlwn-7f6344896d3e5be3ccfef1c5c98ef24940e5f229.tar.gz
lwn-7f6344896d3e5be3ccfef1c5c98ef24940e5f229.zip
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>
Diffstat (limited to 'drivers/powercap')
-rw-r--r--drivers/powercap/powercap_sys.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/powercap/powercap_sys.c b/drivers/powercap/powercap_sys.c
index 5b10b50f8686..64b2b2501a79 100644
--- a/drivers/powercap/powercap_sys.c
+++ b/drivers/powercap/powercap_sys.c
@@ -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);