From: Andrew Morton <akpm@linux-foundation.org>
To: Wei Yongjun <weiyj.lk@gmail.com>
Cc: keescook@chromium.org, yongjun_wei@trendmicro.com.cn,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] i2o: add missing destroy_workqueue() on error in i2o_driver_register()
Date: Tue, 24 Sep 2013 16:46:46 -0700 [thread overview]
Message-ID: <20130924164646.c42172bb0f86e5eec0c16fe5@linux-foundation.org> (raw)
In-Reply-To: <CAPgLHd_sVSo04e4Su0sUm7h7wgM6xP=XVb+sWFT-e-VZP7FJXQ@mail.gmail.com>
On Mon, 23 Sep 2013 17:56:56 +0800 Wei Yongjun <weiyj.lk@gmail.com> wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> Add the missing destroy_workqueue() before return from
> i2o_driver_register() in the error handling case.
yup.
> --- a/drivers/message/i2o/driver.c
> +++ b/drivers/message/i2o/driver.c
> @@ -105,7 +105,8 @@ int i2o_driver_register(struct i2o_driver *drv)
> osm_err("too many drivers registered, increase "
> "max_drivers\n");
> spin_unlock_irqrestore(&i2o_drivers_lock, flags);
> - return -EFAULT;
> + rc = -EFAULT;
Why on earth does this function return -EFAULT (twice)? Imagine the poor
user's confusion if that code gets propagated back to his application
or shell.
prev parent reply other threads:[~2013-09-24 23:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-23 9:56 Wei Yongjun
2013-09-23 15:47 ` Kees Cook
2013-09-24 23:46 ` Andrew Morton [this message]
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=20130924164646.c42172bb0f86e5eec0c16fe5@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=weiyj.lk@gmail.com \
--cc=yongjun_wei@trendmicro.com.cn \
/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®