aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/memory.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/base/memory.c')
-rw-r--r--drivers/base/memory.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/base/memory.c b/drivers/base/memory.c
index 0a134a424a37..9f9b2359f718 100644
--- a/drivers/base/memory.c
+++ b/drivers/base/memory.c
@@ -389,15 +389,14 @@ memory_probe_store(struct class *class, struct class_attribute *attr,
389 ret = add_memory(nid, phys_addr, 389 ret = add_memory(nid, phys_addr,
390 PAGES_PER_SECTION << PAGE_SHIFT); 390 PAGES_PER_SECTION << PAGE_SHIFT);
391 if (ret) 391 if (ret)
392 break; 392 goto out;
393 393
394 phys_addr += MIN_MEMORY_BLOCK_SIZE; 394 phys_addr += MIN_MEMORY_BLOCK_SIZE;
395 } 395 }
396 396
397 if (ret) 397 ret = count;
398 count = ret; 398out:
399 399 return ret;
400 return count;
401} 400}
402static CLASS_ATTR(probe, S_IWUSR, NULL, memory_probe_store); 401static CLASS_ATTR(probe, S_IWUSR, NULL, memory_probe_store);
403 402