From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:35732 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753033AbdLRM6t (ORCPT ); Mon, 18 Dec 2017 07:58:49 -0500 Subject: Patch "nullb: fix error return code in null_init()" has been added to the 4.14-stable tree To: weiyongjun1@huawei.com, alexander.levin@verizon.com, axboe@kernel.dk, gregkh@linuxfoundation.org Cc: , From: Date: Mon, 18 Dec 2017 13:57:32 +0100 Message-ID: <151360185252176@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled nullb: fix error return code in null_init() to the 4.14-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: nullb-fix-error-return-code-in-null_init.patch and it can be found in the queue-4.14 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From foo@baz Mon Dec 18 13:29:00 CET 2017 From: Wei Yongjun Date: Tue, 17 Oct 2017 12:11:46 +0000 Subject: nullb: fix error return code in null_init() From: Wei Yongjun [ Upstream commit 30c516d750396c5f3ec9cb04c9e025c25e91495e ] Fix to return error code -ENOMEM from the null_alloc_dev() error handling case instead of 0, as done elsewhere in this function. Fixes: 2984c8684f96 ("nullb: factor disk parameters") Signed-off-by: Wei Yongjun Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/block/null_blk.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/drivers/block/null_blk.c +++ b/drivers/block/null_blk.c @@ -1985,8 +1985,10 @@ static int __init null_init(void) for (i = 0; i < nr_devices; i++) { dev = null_alloc_dev(); - if (!dev) + if (!dev) { + ret = -ENOMEM; goto err_dev; + } ret = null_add_dev(dev); if (ret) { null_free_dev(dev); Patches currently in stable-queue which might be from weiyongjun1@huawei.com are queue-4.14/nullb-fix-error-return-code-in-null_init.patch queue-4.14/mlxsw-spectrum-fix-error-return-code-in-mlxsw_sp_port_create.patch