Skip to content

Commit

Permalink
s390/scm_blk: fix error return code in scm_blk_init()
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Wei Yongjun authored and Martin Schwidefsky committed Mar 21, 2013
1 parent 3bff603 commit 94f9852
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions drivers/s390/block/scm_blk.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 94f9852

Please sign in to comment.