]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
nvme-pci: print error message on failure in nvme_probe
authorGerd Bayer <gbayer@linux.ibm.com>
Fri, 24 Oct 2025 11:05:31 +0000 (13:05 +0200)
committerKeith Busch <kbusch@kernel.org>
Mon, 1 Dec 2025 21:45:57 +0000 (13:45 -0800)
Add a new error message that makes failures to probe visible in the
kernel log, like:
nvme 0008:00:00.0: error -ENODEV: probe failed

This highlights issues with a particular device right away instead of
leaving users to search for missing drives.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Wilfred Mallawa <wilfred.mallawa@wdc.com>
Signed-off-by: Gerd Bayer <gbayer@linux.ibm.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
drivers/nvme/host/pci.c

index 9085bed107fde4ebf14a6e4879541948e8b9b52c..9a7616aa6889be3b89366e570c106c96fb0bff9b 100644 (file)
@@ -3602,6 +3602,7 @@ out_uninit_ctrl:
        nvme_uninit_ctrl(&dev->ctrl);
 out_put_ctrl:
        nvme_put_ctrl(&dev->ctrl);
+       dev_err_probe(&pdev->dev, result, "probe failed\n");
        return result;
 }