From: Axel Lin <axel.lin@ingics.com>
To: Anton Vorontsov <cbou@mail.ru>
Cc: Rupesh Kumar <rupesh.kumar@stericsson.com>,
Michel JAOUEN <michel.jaouen@stericsson.com>,
Loic Pallardy <loic.pallardy@stericsson.com>,
David Woodhouse <dwmw2@infradead.org>,
linux-kernel@vger.kernel.org
Subject: [PATCH] power_supply: pm2301_charger: Return error if create_singlethread_workqueue fails
Date: Thu, 16 May 2013 21:17:04 +0800 [thread overview]
Message-ID: <1368710224.5500.1.camel@phoenix> (raw)
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
next reply other threads:[~2013-05-16 13:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-16 13:17 Axel Lin [this message]
2013-05-20 11:42 ` [PATCH] power_supply: pm2301_charger: Return error if create_singlethread_workqueue fails Linus Walleij
2013-06-07 0:27 ` Anton Vorontsov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1368710224.5500.1.camel@phoenix \
--to=axel.lin@ingics.com \
--cc=cbou@mail.ru \
--cc=dwmw2@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=loic.pallardy@stericsson.com \
--cc=michel.jaouen@stericsson.com \
--cc=rupesh.kumar@stericsson.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox