diff options
| author | Davidlohr Bueso <dave@stgolabs.net> | 2024-11-15 09:00:32 -0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-12-27 13:58:46 +0100 |
| commit | fa299bfc1e0efda28350aae60153d17267b0853e (patch) | |
| tree | 9534be50d2cb41a0f34b6c3b9774febe48518d08 /drivers/cxl | |
| parent | 9557ed4dcd8f9ee5cd5ad403bff890c8f1df7686 (diff) | |
| download | linux-fa299bfc1e0efda28350aae60153d17267b0853e.tar.gz linux-fa299bfc1e0efda28350aae60153d17267b0853e.tar.bz2 linux-fa299bfc1e0efda28350aae60153d17267b0853e.zip | |
cxl/pci: Fix potential bogus return value upon successful probing
[ Upstream commit da4d8c83358163df9a4addaeba0ef8bcb03b22e8 ]
If cxl_pci_ras_unmask() returns non-zero, cxl_pci_probe() will end up
returning that value, instead of zero.
Fixes: 248529edc86f ("cxl: add RAS status unmasking for CXL")
Reviewed-by: Fan Ni <fan.ni@samsung.com>
Signed-off-by: Davidlohr Bueso <dave@stgolabs.net>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Link: https://patch.msgid.link/20241115170032.108445-1-dave@stgolabs.net
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/cxl')
| -rw-r--r-- | drivers/cxl/pci.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/cxl/pci.c b/drivers/cxl/pci.c index 8bece1e2e249..aacd93f9067d 100644 --- a/drivers/cxl/pci.c +++ b/drivers/cxl/pci.c @@ -911,8 +911,7 @@ static int cxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) if (rc) return rc; - rc = cxl_pci_ras_unmask(pdev); - if (rc) + if (cxl_pci_ras_unmask(pdev)) dev_dbg(&pdev->dev, "No RAS reporting unmasked\n"); pci_save_state(pdev); |
