]> git.baikalelectronics.ru Git - kernel.git/commit
nvme: don't initlialize ctrl->cntlid twice
authorAndrey Smirnov <andrew.smirnov@gmail.com>
Tue, 8 Jan 2019 03:08:49 +0000 (19:08 -0800)
committerChristoph Hellwig <hch@lst.de>
Wed, 9 Jan 2019 18:47:08 +0000 (13:47 -0500)
commitaa7f6797fd3a3266e39a0eb1605739e79b99f016
tree8cf26b22c6592b7456aef2c8e39a4f0d7679522a
parent7da0e96ae456806101a9b70adeae456d97ff607c
nvme: don't initlialize ctrl->cntlid twice

ctrl->cntlid will already be initialized from id->cntlid for
non-NVME_F_FABRICS controllers few lines below. For NVME_F_FABRICS
controllers this field should already be initialized, otherwise the
check

if (ctrl->cntlid != le16_to_cpu(id->cntlid))

below will always be a no-op.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Reviewed-by: Keith Busch <keith.busch@intel.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/core.c