|
@@ -2437,8 +2437,11 @@ static int vmalloc_open(struct inode *inode, struct file *file)
|
|
|
unsigned int *ptr = NULL;
|
|
unsigned int *ptr = NULL;
|
|
|
int ret;
|
|
int ret;
|
|
|
|
|
|
|
|
- if (NUMA_BUILD)
|
|
|
|
|
|
|
+ if (NUMA_BUILD) {
|
|
|
ptr = kmalloc(nr_node_ids * sizeof(unsigned int), GFP_KERNEL);
|
|
ptr = kmalloc(nr_node_ids * sizeof(unsigned int), GFP_KERNEL);
|
|
|
|
|
+ if (ptr == NULL)
|
|
|
|
|
+ return -ENOMEM;
|
|
|
|
|
+ }
|
|
|
ret = seq_open(file, &vmalloc_op);
|
|
ret = seq_open(file, &vmalloc_op);
|
|
|
if (!ret) {
|
|
if (!ret) {
|
|
|
struct seq_file *m = file->private_data;
|
|
struct seq_file *m = file->private_data;
|