From: Libin <huawei.libin@huawei.com>
To: Tejun Heo <tj@kernel.org>
Cc: <linux-kernel@vger.kernel.org>, <wangyijing@huawei.com>,
<guohanjun@huawei.com>
Subject: [PATCH] workqueue: remove unnecessary goto statement
Date: Sat, 24 Aug 2013 08:34:31 +0800 [thread overview]
Message-ID: <1377304471-25232-1-git-send-email-huawei.libin@huawei.com> (raw)
Using return NULL to replace goto statement and avoiding a redundant
function call for free_workqueue_attrs(). If kzalloc for attrs of
struct workqueue_attrs is failed, alloc_workqueue_attrs return
NULL directedly. With no functional changs.
Signed-off-by: Libin <huawei.libin@huawei.com>
---
kernel/workqueue.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 7f5d4be..dabeb88 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -3400,7 +3400,7 @@ struct workqueue_attrs *alloc_workqueue_attrs(gfp_t gfp_mask)
attrs = kzalloc(sizeof(*attrs), gfp_mask);
if (!attrs)
- goto fail;
+ return NULL;
if (!alloc_cpumask_var(&attrs->cpumask, gfp_mask))
goto fail;
--
1.8.2.1
reply other threads:[~2013-08-24 0:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1377304471-25232-1-git-send-email-huawei.libin@huawei.com \
--to=huawei.libin@huawei.com \
--cc=guohanjun@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@kernel.org \
--cc=wangyijing@huawei.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
all inboxes | Powered by JetHome®