]> git.hungrycats.org Git - linux/commitdiff
cxl/pci: fix error code in __cxl_hdm_decode_init()
authorDan Carpenter <dan.carpenter@linaro.org>
Fri, 15 Nov 2024 14:11:38 +0000 (17:11 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 22 Nov 2024 14:37:32 +0000 (15:37 +0100)
When commit 0cab68720598 ("cxl/pci: Fix disabling memory if DVSEC CXL
Range does not match a CFMWS window") was backported, this chunk moved
from the cxl_hdm_decode_init() function which returns negative error
codes to the __cxl_hdm_decode_init() function which returns false on
error.  So the error code needs to be modified from -ENXIO to false.

This issue only exits in the 6.1.y kernels.  In later kernels negative
error codes are correct and the driver didn't exist in earlier kernels.

Fixes: 031217128990 ("cxl/pci: Fix disabling memory if DVSEC CXL Range does not match a CFMWS window")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/cxl/core/pci.c

index 8d92a24fd73d98ca74b4ca24afa3cd6fcc8dd471..97adf9a7ea8947d3a2d2c86e5b85819085ffd530 100644 (file)
@@ -377,7 +377,7 @@ static bool __cxl_hdm_decode_init(struct cxl_dev_state *cxlds,
 
        if (!allowed && info->mem_enabled) {
                dev_err(dev, "Range register decodes outside platform defined CXL ranges.\n");
-               return -ENXIO;
+               return false;
        }
 
        /*