Commit c9adfb5b authored by Gerd Bayer's avatar Gerd Bayer Committed by Keith Busch
Browse files

nvme-pci: print error message on failure in nvme_probe



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: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarWilfred Mallawa <wilfred.mallawa@wdc.com>
Signed-off-by: default avatarGerd Bayer <gbayer@linux.ibm.com>
Signed-off-by: default avatarKeith Busch <kbusch@kernel.org>
parent 3c1fb0ce
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -3602,6 +3602,7 @@ static int nvme_probe(struct pci_dev *pdev, const struct pci_device_id *id)
	nvme_uninit_ctrl(&dev->ctrl);
out_put_ctrl:
	nvme_put_ctrl(&dev->ctrl);
	dev_err_probe(&pdev->dev, result, "probe failed\n");
	return result;
}