提交 9f0af69b 编写于 作者: N Nikanth Karthikesan 提交者: Jiri Kosina

sysfs-memory: fix uninitialized variable warning and clean-up code.

sysfs-memory: Fix uninitialized variable warning and clean-up code.
Signed-off-by: NNikanth Karthikesan <knikanth@suse.de>
Signed-off-by: NJiri Kosina <jkosina@suse.cz>
上级 06794eae
...@@ -396,15 +396,14 @@ memory_probe_store(struct class *class, struct class_attribute *attr, ...@@ -396,15 +396,14 @@ memory_probe_store(struct class *class, struct class_attribute *attr,
ret = add_memory(nid, phys_addr, ret = add_memory(nid, phys_addr,
PAGES_PER_SECTION << PAGE_SHIFT); PAGES_PER_SECTION << PAGE_SHIFT);
if (ret) if (ret)
break; goto out;
phys_addr += MIN_MEMORY_BLOCK_SIZE; phys_addr += MIN_MEMORY_BLOCK_SIZE;
} }
if (ret) ret = count;
count = ret; out:
return ret;
return count;
} }
static CLASS_ATTR(probe, S_IWUSR, NULL, memory_probe_store); static CLASS_ATTR(probe, S_IWUSR, NULL, memory_probe_store);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册