diff options
Diffstat (limited to 'drivers/cxl/core/region.c')
-rw-r--r-- | drivers/cxl/core/region.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/cxl/core/region.c b/drivers/cxl/core/region.c index fe1d8392870e..f29028148806 100644 --- a/drivers/cxl/core/region.c +++ b/drivers/cxl/core/region.c @@ -2625,10 +2625,9 @@ int cxl_add_to_region(struct cxl_port *root, struct cxl_endpoint_decoder *cxled) cxlr = to_cxl_region(region_dev); mutex_unlock(&cxlrd->range_lock); - if (IS_ERR(cxlr)) { - rc = PTR_ERR(cxlr); + rc = PTR_ERR_OR_ZERO(cxlr); + if (rc) goto out; - } attach_target(cxlr, cxled, -1, TASK_UNINTERRUPTIBLE); |