提交 94f9852d 编写于 作者: W Wei Yongjun 提交者: Martin Schwidefsky

s390/scm_blk: fix error return code in scm_blk_init()

Fix to return a negative error code from the error handling
case instead of 0, as returned elsewhere in this function.
Signed-off-by: NWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: NSebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
上级 3bff6038
...@@ -463,12 +463,15 @@ static int __init scm_blk_init(void) ...@@ -463,12 +463,15 @@ static int __init scm_blk_init(void)
goto out; goto out;
scm_major = ret; scm_major = ret;
if (scm_alloc_rqs(nr_requests)) ret = scm_alloc_rqs(nr_requests);
if (ret)
goto out_unreg; goto out_unreg;
scm_debug = debug_register("scm_log", 16, 1, 16); scm_debug = debug_register("scm_log", 16, 1, 16);
if (!scm_debug) if (!scm_debug) {
ret = -ENOMEM;
goto out_free; goto out_free;
}
debug_register_view(scm_debug, &debug_hex_ascii_view); debug_register_view(scm_debug, &debug_hex_ascii_view);
debug_set_level(scm_debug, 2); debug_set_level(scm_debug, 2);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册