Re: [PATCH v2] cxl/region: Fix memregion leaks in devm_cxl_add_region()

From: Dan Williams
Date: Tue May 21 2024 - 12:20:07 EST


Li Zhijian wrote:
> Move the mode verification to __create_region() before allocating the
> memregion to avoid the memregion leaks.
>
> Fixes: 6e099264185d ("cxl/region: Add volatile region creation support")
> Signed-off-by: Li Zhijian <lizhijian@xxxxxxxxxxx>
> ---
> V2: Move the mode verification to __create_region() # Dan
> ---
> drivers/cxl/core/region.c | 18 +++++++++---------
> 1 file changed, 9 insertions(+), 9 deletions(-)

LGTM

Reviewed-by: Dan Williams <dan.j.williams@xxxxxxxxx>