Skip to content

Commit

Permalink
sysfs-memory: fix uninitialized variable warning and clean-up code.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Nikanth Karthikesan authored and Jiri Kosina committed Apr 10, 2011
1 parent 06794ea commit 9f0af69
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions drivers/base/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 9f0af69

Please sign in to comment.