cxl/region: Fix IS_ERR() vs NULL check
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 3 Aug 2022 09:07:50 +0000 (12:07 +0300)
committerDan Williams <dan.j.williams@intel.com>
Fri, 5 Aug 2022 15:41:02 +0000 (08:41 -0700)
commit9fd2cf4d6fba8253efa62ba45f623ab7f09df12d
treec27e13939725ca2cec128b4cdfe83aa4583516c4
parente29a8995d63f6f861b2cc446c58cef430885f469
cxl/region: Fix IS_ERR() vs NULL check

The nvdimm_pmem_region_create() function returns NULL on error.  It does
not return error pointers.

Fixes: 04ad63f086d1 ("cxl/region: Introduce cxl_pmem_region objects")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/Yuo65lq2WtfdGJ0X@kili
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/cxl/pmem.c