projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
06794ea
)
sysfs-memory: fix uninitialized variable warning and clean-up code.
author
Nikanth Karthikesan
<knikanth@suse.de>
Thu, 24 Mar 2011 06:16:18 +0000
(11:46 +0530)
committer
Jiri Kosina
<jkosina@suse.cz>
Sun, 10 Apr 2011 15:01:05 +0000
(17:01 +0200)
sysfs-memory: Fix uninitialized variable warning and clean-up code.
Signed-off-by: Nikanth Karthikesan <knikanth@suse.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/base/memory.c
patch
|
blob
|
history
diff --git
a/drivers/base/memory.c
b/drivers/base/memory.c
index 3da6a43b77567d622f0768e6049c71533e55ed0e..89ffb4425d1d79ea4aaaec72fdb076c5667d0e18 100644
(file)
--- a/
drivers/base/memory.c
+++ b/
drivers/base/memory.c
@@
-396,15
+396,14
@@
memory_probe_store(struct class *class, struct class_attribute *attr,
ret = add_memory(nid, phys_addr,
PAGES_PER_SECTION << PAGE_SHIFT);
if (ret)
-
break
;
+
goto out
;
phys_addr += MIN_MEMORY_BLOCK_SIZE;
}
- if (ret)
- count = ret;
-
- return count;
+ ret = count;
+out:
+ return ret;
}
static CLASS_ATTR(probe, S_IWUSR, NULL, memory_probe_store);