aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/power
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2013-05-16 09:17:04 -0400
committerAnton Vorontsov <anton@enomsg.org>2013-06-06 20:25:48 -0400
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 bb346becd7b4..1c0bfcbae062 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,
1075 pm2->ac_chg.external = true; 1075 pm2->ac_chg.external = true;
1076 1076
1077 /* Create a work queue for the charger */ 1077 /* Create a work queue for the charger */
1078 pm2->charger_wq = 1078 pm2->charger_wq = create_singlethread_workqueue("pm2xxx_charger_wq");
1079 create_singlethread_workqueue("pm2xxx_charger_wq");
1080 if (pm2->charger_wq == NULL) { 1079 if (pm2->charger_wq == NULL) {
1080 ret = -ENOMEM;
1081 dev_err(pm2->dev, "failed to create work queue\n"); 1081 dev_err(pm2->dev, "failed to create work queue\n");
1082 goto free_device_info; 1082 goto free_device_info;
1083 } 1083 }