aboutsummaryrefslogtreecommitdiff
path: root/drivers/power
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2013-05-16 21:17:04 +0800
committerAnton Vorontsov <anton@enomsg.org>2013-06-06 17:25:48 -0700
commitc509a62c9469e2787bcacc7aba454d555732b0b6 (patch)
tree73972ab9429753156a59a4618f4a7022a96dafb4 /drivers/power
parentdf311333a8c13f3ffe2537a4ff507887208cb863 (diff)
pm2301_charger: Return error if create_singlethread_workqueue fails
Return error instead of 0 if create_singlethread_workqueue call fails. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/pm2301_charger.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/power/pm2301_charger.c b/drivers/power/pm2301_charger.c
index bb346becd7b..1c0bfcbae06 100644
--- a/drivers/power/pm2301_charger.c
+++ b/drivers/power/pm2301_charger.c
@@ -1075,9 +1075,9 @@ static int pm2xxx_wall_charger_probe(struct i2c_client *i2c_client,
pm2->ac_chg.external = true;
/* Create a work queue for the charger */
- pm2->charger_wq =
- create_singlethread_workqueue("pm2xxx_charger_wq");
+ pm2->charger_wq = create_singlethread_workqueue("pm2xxx_charger_wq");
if (pm2->charger_wq == NULL) {
+ ret = -ENOMEM;
dev_err(pm2->dev, "failed to create work queue\n");
goto free_device_info;
}