From: Christoph Hellwig Date: Tue, 22 Nov 2022 07:48:13 +0000 (+0100) Subject: nvme-pci: return early on ctrl state mismatch in nvme_reset_work X-Git-Tag: v6.6.17~5962^2~4^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8cb9f10b7151e308824cdcf3168010d673e7888c;p=platform%2Fkernel%2Flinux-rpi.git nvme-pci: return early on ctrl state mismatch in nvme_reset_work The only way nvme_reset_work could be called when not in resetting state is if a reset and remove happen near the same time. This should not happen, but if it did we don't want the reset work to disable the controller because the remove is already doing that. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg --- diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index 1b52737..02940b4 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@ -2792,8 +2792,7 @@ static void nvme_reset_work(struct work_struct *work) if (dev->ctrl.state != NVME_CTRL_RESETTING) { dev_warn(dev->ctrl.device, "ctrl state %d is not RESETTING\n", dev->ctrl.state); - result = -ENODEV; - goto out; + return; } /*