The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] power_supply: pm2301_charger: Return error if create_singlethread_workqueue fails
@ 2013-05-16 13:17 Axel Lin
  2013-05-20 11:42 ` Linus Walleij
  0 siblings, 1 reply; 3+ messages in thread
From: Axel Lin @ 2013-05-16 13:17 UTC (permalink / raw)
  To: Anton Vorontsov
  Cc: Rupesh Kumar, Michel JAOUEN, Loic Pallardy, David Woodhouse,
	linux-kernel

Return error instead of 0 if create_singlethread_workqueue call fails.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/power/pm2301_charger.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/power/pm2301_charger.c b/drivers/power/pm2301_charger.c
index c972389..6ae3957 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;
 	}
-- 
1.8.1.2




^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-06-07  0:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-16 13:17 [PATCH] power_supply: pm2301_charger: Return error if create_singlethread_workqueue fails Axel Lin
2013-05-20 11:42 ` Linus Walleij
2013-06-07  0:27   ` Anton Vorontsov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox