diff options
Diffstat (limited to 'drivers/power/supply/charger-manager.c')
-rw-r--r-- | drivers/power/supply/charger-manager.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/power/supply/charger-manager.c b/drivers/power/supply/charger-manager.c index 2e8db5e6de0b..a21e1a2673f8 100644 --- a/drivers/power/supply/charger-manager.c +++ b/drivers/power/supply/charger-manager.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (C) 2011 Samsung Electronics Co., Ltd. * MyungJoo Ham <myungjoo.ham@samsung.com> @@ -7,9 +8,6 @@ * Charger manager depends on other devices. Register this later than * the depending devices. * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. **/ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt @@ -1987,6 +1985,9 @@ static struct platform_driver charger_manager_driver = { static int __init charger_manager_init(void) { cm_wq = create_freezable_workqueue("charger_manager"); + if (unlikely(!cm_wq)) + return -ENOMEM; + INIT_DELAYED_WORK(&cm_monitor_work, cm_monitor_poller); return platform_driver_register(&charger_manager_driver); |