File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -1222,23 +1222,19 @@ int cxl_mem_sanitize(struct cxl_memdev *cxlmd, u16 cmd)
1222
1222
{
1223
1223
struct cxl_memdev_state * mds = to_cxl_memdev_state (cxlmd -> cxlds );
1224
1224
struct cxl_port * endpoint ;
1225
- int rc ;
1226
1225
1227
1226
/* synchronize with cxl_mem_probe() and decoder write operations */
1228
1227
guard (device )(& cxlmd -> dev );
1229
1228
endpoint = cxlmd -> endpoint ;
1230
- down_read (& cxl_region_rwsem );
1229
+ guard ( rwsem_read ) (& cxl_region_rwsem );
1231
1230
/*
1232
1231
* Require an endpoint to be safe otherwise the driver can not
1233
1232
* be sure that the device is unmapped.
1234
1233
*/
1235
1234
if (endpoint && cxl_num_decoders_committed (endpoint ) == 0 )
1236
- rc = __cxl_mem_sanitize (mds , cmd );
1237
- else
1238
- rc = - EBUSY ;
1239
- up_read (& cxl_region_rwsem );
1235
+ return __cxl_mem_sanitize (mds , cmd );
1240
1236
1241
- return rc ;
1237
+ return - EBUSY ;
1242
1238
}
1243
1239
1244
1240
static int add_dpa_res (struct device * dev , struct resource * parent ,
You can’t perform that action at this time.
0 commit comments