Skip to content

Commit da4d8c8

Browse files
Davidlohr Buesodavejiang
authored andcommitted
cxl/pci: Fix potential bogus return value upon successful probing
If cxl_pci_ras_unmask() returns non-zero, cxl_pci_probe() will end up returning that value, instead of zero. Fixes: 248529e ("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]>
1 parent fac04ef commit da4d8c8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/cxl/pci.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,8 +1032,7 @@ static int cxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
10321032
if (rc)
10331033
return rc;
10341034

1035-
rc = cxl_pci_ras_unmask(pdev);
1036-
if (rc)
1035+
if (cxl_pci_ras_unmask(pdev))
10371036
dev_dbg(&pdev->dev, "No RAS reporting unmasked\n");
10381037

10391038
pci_save_state(pdev);

0 commit comments

Comments
 (0)