mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-03-22 07:27:12 +08:00
Merge tag 'cxl-fixes-6.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl
Pull cxl fixes from Dave Jiang: - Compile fix for cxl-test from missing linux/vmalloc.h - Fix for memregion leaks in devm_cxl_add_region() * tag 'cxl-fixes-6.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl: cxl/region: Fix memregion leaks in devm_cxl_add_region() cxl/test: Add missing vmalloc.h for tools/testing/cxl/test/mem.c
This commit is contained in:
@@ -2352,15 +2352,6 @@ static struct cxl_region *devm_cxl_add_region(struct cxl_root_decoder *cxlrd,
|
||||
struct device *dev;
|
||||
int rc;
|
||||
|
||||
switch (mode) {
|
||||
case CXL_DECODER_RAM:
|
||||
case CXL_DECODER_PMEM:
|
||||
break;
|
||||
default:
|
||||
dev_err(&cxlrd->cxlsd.cxld.dev, "unsupported mode %d\n", mode);
|
||||
return ERR_PTR(-EINVAL);
|
||||
}
|
||||
|
||||
cxlr = cxl_region_alloc(cxlrd, id);
|
||||
if (IS_ERR(cxlr))
|
||||
return cxlr;
|
||||
@@ -2415,6 +2406,15 @@ static struct cxl_region *__create_region(struct cxl_root_decoder *cxlrd,
|
||||
{
|
||||
int rc;
|
||||
|
||||
switch (mode) {
|
||||
case CXL_DECODER_RAM:
|
||||
case CXL_DECODER_PMEM:
|
||||
break;
|
||||
default:
|
||||
dev_err(&cxlrd->cxlsd.cxld.dev, "unsupported mode %d\n", mode);
|
||||
return ERR_PTR(-EINVAL);
|
||||
}
|
||||
|
||||
rc = memregion_alloc(GFP_KERNEL);
|
||||
if (rc < 0)
|
||||
return ERR_PTR(rc);
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/vmalloc.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/sizes.h>
|
||||
|
||||
Reference in New Issue
Block a user