]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
cxl/acpi: Return 'rc' instead of '0' in cxl_parse_cfmws()
authorBreno Leitao <leitao@debian.org>
Fri, 14 Jul 2023 09:31:46 +0000 (02:31 -0700)
committerRoxana Nicolescu <roxana.nicolescu@canonical.com>
Mon, 2 Oct 2023 15:20:50 +0000 (17:20 +0200)
BugLink: https://bugs.launchpad.net/bugs/2037005
[ Upstream commit 91019b5bc7c2c5e6f676cce80ee6d12b2753d018 ]

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: f4ce1f766f1e ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Roxana Nicolescu <roxana.nicolescu@canonical.com>
drivers/cxl/acpi.c

index 315bee263f632249b9e71196438e8c7853e86963..83a27b69044fff069104a8da8e01bac58fcec65f 100644 (file)
@@ -297,7 +297,7 @@ err_xormap:
                rc = cxl_decoder_autoremove(dev, cxld);
        if (rc) {
                dev_err(dev, "Failed to add decode range: %pr", res);
-               return 0;
+               return rc;
        }
        dev_dbg(dev, "add: %s node: %d range [%#llx - %#llx]\n",
                dev_name(&cxld->dev),