lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211130135015.1818325-1-mudongliangabcd@gmail.com>
Date:   Tue, 30 Nov 2021 21:50:14 +0800
From:   Dongliang Mu <mudongliangabcd@...il.com>
To:     Keith Busch <kbusch@...nel.org>, Jens Axboe <axboe@...com>,
        Christoph Hellwig <hch@....de>,
        Sagi Grimberg <sagi@...mberg.me>
Cc:     Dongliang Mu <mudongliangabcd@...il.com>,
        linux-nvme@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: [PATCH] driver: nvme: fix missing error code

Smatch reports:

drivers/nvme/host/multipath.c:865
nvme_mpath_init_identify() warn: missing error code 'error'

In one error handling path of nvme_mpath_init_identify(Line 865), error
is not initialized as an errno.

Fix this by assigning error to -EINVAL.

Signed-off-by: Dongliang Mu <mudongliangabcd@...il.com>
---
 drivers/nvme/host/multipath.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c
index 7f2071f2460c..2cbeb6d6b064 100644
--- a/drivers/nvme/host/multipath.c
+++ b/drivers/nvme/host/multipath.c
@@ -862,6 +862,7 @@ int nvme_mpath_init_identify(struct nvme_ctrl *ctrl, struct nvme_id_ctrl *id)
 			"ANA log page size (%zd) larger than MDTS (%zd).\n",
 			ana_log_size, max_transfer_size);
 		dev_err(ctrl->device, "disabling ANA support.\n");
+		error = -EINVAL;
 		goto out_uninit;
 	}
 	if (ana_log_size > ctrl->ana_log_size) {
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ