cxl: Add missing return to cdat read error path
Changes
1 files changed · +1 −0
| File | Status | Add | Del | Content |
|---|---|---|---|---|
| drivers/cxl/core/pci.c | modified | +1 | −0 | View file |
drivers/cxl/core/pci.c
View filediff --git a/drivers/cxl/core/pci.c b/drivers/cxl/core/pci.c
index bdbd907..f332fe7 100644
--- a/drivers/cxl/core/pci.c
+++ b/drivers/cxl/core/pci.c
@@ -571,6 +571,7 @@ void read_cdat_data(struct cxl_port *port)
/* Don't leave table data allocated on error */
devm_kfree(dev, cdat_table);
dev_err(dev, "CDAT data read error\n");
+ return;
}
port->cdat.table = cdat_table + sizeof(__le32);