Skip to content

Commit 91019b5

Browse files
leitaostellarhopper
authored andcommitted
cxl/acpi: Return 'rc' instead of '0' in cxl_parse_cfmws()
Driver initialization returned success (return 0) even if the initialization (cxl_decoder_add() or acpi_table_parse_cedt()) failed. Return the error instead of swallowing it. Fixes: f4ce1f7 ("cxl/acpi: Convert CFMWS parsing to ACPI sub-table helpers") Signed-off-by: Breno Leitao <leitao@debian.org> Link: https://lore.kernel.org/r/20230714093146.2253438-2-leitao@debian.org Reviewed-by: Alison Schofield <alison.schofield@intel.com> Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
1 parent 4cf67d3 commit 91019b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/cxl/acpi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ static int cxl_parse_cfmws(union acpi_subtable_headers *header, void *arg,
297297
rc = cxl_decoder_autoremove(dev, cxld);
298298
if (rc) {
299299
dev_err(dev, "Failed to add decode range: %pr", res);
300-
return 0;
300+
return rc;
301301
}
302302
dev_dbg(dev, "add: %s node: %d range [%#llx - %#llx]\n",
303303
dev_name(&cxld->dev),

0 commit comments

Comments
 (0)