File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -2352,15 +2352,6 @@ static struct cxl_region *devm_cxl_add_region(struct cxl_root_decoder *cxlrd,
2352
2352
struct device * dev ;
2353
2353
int rc ;
2354
2354
2355
- switch (mode ) {
2356
- case CXL_DECODER_RAM :
2357
- case CXL_DECODER_PMEM :
2358
- break ;
2359
- default :
2360
- dev_err (& cxlrd -> cxlsd .cxld .dev , "unsupported mode %d\n" , mode );
2361
- return ERR_PTR (- EINVAL );
2362
- }
2363
-
2364
2355
cxlr = cxl_region_alloc (cxlrd , id );
2365
2356
if (IS_ERR (cxlr ))
2366
2357
return cxlr ;
@@ -2415,6 +2406,15 @@ static struct cxl_region *__create_region(struct cxl_root_decoder *cxlrd,
2415
2406
{
2416
2407
int rc ;
2417
2408
2409
+ switch (mode ) {
2410
+ case CXL_DECODER_RAM :
2411
+ case CXL_DECODER_PMEM :
2412
+ break ;
2413
+ default :
2414
+ dev_err (& cxlrd -> cxlsd .cxld .dev , "unsupported mode %d\n" , mode );
2415
+ return ERR_PTR (- EINVAL );
2416
+ }
2417
+
2418
2418
rc = memregion_alloc (GFP_KERNEL );
2419
2419
if (rc < 0 )
2420
2420
return ERR_PTR (rc );
You can’t perform that action at this time.
0 commit comments