From: Axel Lin Date: Thu, 16 May 2013 13:17:04 +0000 (+0800) Subject: pm2301_charger: Return error if create_singlethread_workqueue fails X-Git-Tag: next-20130607~44^2~4 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=c509a62c9469e2787bcacc7aba454d555732b0b6;p=karo-tx-linux.git 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 Acked-by: Linus Walleij Signed-off-by: Anton Vorontsov --- 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, 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; }