]> Git Repo - J-linux.git/commitdiff
cxl/pci: Fix potential bogus return value upon successful probing
authorDavidlohr Bueso <[email protected]>
Fri, 15 Nov 2024 17:00:32 +0000 (09:00 -0800)
committerDave Jiang <[email protected]>
Tue, 10 Dec 2024 21:30:51 +0000 (14:30 -0700)
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 <[email protected]>
Signed-off-by: Davidlohr Bueso <[email protected]>
Reviewed-by: Ira Weiny <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Dave Jiang <[email protected]>
drivers/cxl/pci.c

index 0241d1d7133a4b9c3fe3fddfdc0bcc9cf807ee11..26ab06c9deffb2bdb27758fca96eb2ed8ea1cc80 100644 (file)
@@ -1032,8 +1032,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);
This page took 0.042296 seconds and 4 git commands to generate.