Commit c509a62c authored by Axel Lin's avatar Axel Lin Committed by Anton Vorontsov

pm2301_charger: Return error if create_singlethread_workqueue fails

Return error instead of 0 if create_singlethread_workqueue call fails.
Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarAnton Vorontsov <anton@enomsg.org>
parent df311333
...@@ -1075,9 +1075,9 @@ static int pm2xxx_wall_charger_probe(struct i2c_client *i2c_client, ...@@ -1075,9 +1075,9 @@ static int pm2xxx_wall_charger_probe(struct i2c_client *i2c_client,
pm2->ac_chg.external = true; pm2->ac_chg.external = true;
/* Create a work queue for the charger */ /* Create a work queue for the charger */
pm2->charger_wq = pm2->charger_wq = create_singlethread_workqueue("pm2xxx_charger_wq");
create_singlethread_workqueue("pm2xxx_charger_wq");
if (pm2->charger_wq == NULL) { if (pm2->charger_wq == NULL) {
ret = -ENOMEM;
dev_err(pm2->dev, "failed to create work queue\n"); dev_err(pm2->dev, "failed to create work queue\n");
goto free_device_info; goto free_device_info;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment