Commit 49ba7b5
cxl/region: Fix memregion leaks in devm_cxl_add_region()
Move the mode verification to __create_region() before allocating the
memregion to avoid the memregion leaks.
Fixes: 6e09926 ("cxl/region: Add volatile region creation support")
Signed-off-by: Li Zhijian <[email protected]>
Reviewed-by: Dan Williams <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Dave Jiang <[email protected]>1 parent d555105 commit 49ba7b5
1 file changed
+9
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2352 | 2352 | | |
2353 | 2353 | | |
2354 | 2354 | | |
2355 | | - | |
2356 | | - | |
2357 | | - | |
2358 | | - | |
2359 | | - | |
2360 | | - | |
2361 | | - | |
2362 | | - | |
2363 | | - | |
2364 | 2355 | | |
2365 | 2356 | | |
2366 | 2357 | | |
| |||
2415 | 2406 | | |
2416 | 2407 | | |
2417 | 2408 | | |
| 2409 | + | |
| 2410 | + | |
| 2411 | + | |
| 2412 | + | |
| 2413 | + | |
| 2414 | + | |
| 2415 | + | |
| 2416 | + | |
| 2417 | + | |
2418 | 2418 | | |
2419 | 2419 | | |
2420 | 2420 | | |
| |||
0 commit comments