From: Sebastian Ott <sebott@linux.vnet.ibm.com>
To: linux-s390@vger.kernel.org
Subject: Re: [PATCH] s390/scm_blk: fix error return code in scm_blk_init()
Date: Wed, 20 Mar 2013 12:45:15 +0000 [thread overview]
Message-ID: <alpine.LFD.2.03.1303201342440.1588@linux.vnet.ibm.com> (raw)
In-Reply-To: <CAPgLHd83Q_5_8siTwo77Pb2UqN0PzXocObKW4Fs-t34THO-ymQ@mail.gmail.com>
On Wed, 20 Mar 2013, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> Fix to return a negative error code from the error handling
> case instead of 0, as returned elsewhere in this function.
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> ---
> drivers/s390/block/scm_blk.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/s390/block/scm_blk.c b/drivers/s390/block/scm_blk.c
> index 5ac9c93..54556b8 100644
> --- a/drivers/s390/block/scm_blk.c
> +++ b/drivers/s390/block/scm_blk.c
> @@ -463,12 +463,15 @@ static int __init scm_blk_init(void)
> goto out;
>
> scm_major = ret;
> - if (scm_alloc_rqs(nr_requests))
> + ret = scm_alloc_rqs(nr_requests);
> + if (ret)
> goto out_unreg;
>
> scm_debug = debug_register("scm_log", 16, 1, 16);
> - if (!scm_debug)
> + if (!scm_debug) {
> + ret = -ENOMEM;
> goto out_free;
> + }
>
> debug_register_view(scm_debug, &debug_hex_ascii_view);
> debug_set_level(scm_debug, 2);
>
Thanks, applied.
Sebastian
parent reply other threads:[~2013-03-20 12:45 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <CAPgLHd83Q_5_8siTwo77Pb2UqN0PzXocObKW4Fs-t34THO-ymQ@mail.gmail.com>]
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=alpine.LFD.2.03.1303201342440.1588@linux.vnet.ibm.com \
--to=sebott@linux.vnet.ibm.com \
--cc=linux-s390@vger.kernel.org \
/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