summaryrefslogtreecommitdiffstats
path: root/drivers/base/memory.c
diff options
context:
space:
mode:
authorSeth Jennings <sjenning@linux.vnet.ibm.com>2013-08-20 19:12:58 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-08-21 20:47:39 +0200
commit879f1bec8e136c7bc71e38715e62a73b75f91d78 (patch)
treeba67a0123e485f6494185a92938741926830f549 /drivers/base/memory.c
parentdrivers: base: move mutex lock out of add_memory_section() (diff)
downloadlinux-879f1bec8e136c7bc71e38715e62a73b75f91d78.tar.xz
linux-879f1bec8e136c7bc71e38715e62a73b75f91d78.zip
drivers: base: remove unneeded variable
The error variable is not needed. Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base/memory.c')
-rw-r--r--drivers/base/memory.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/base/memory.c b/drivers/base/memory.c
index ed3ada244a07..b31d998a63a5 100644
--- a/drivers/base/memory.c
+++ b/drivers/base/memory.c
@@ -565,16 +565,13 @@ static const struct attribute_group *memory_memblk_attr_groups[] = {
static
int register_memory(struct memory_block *memory)
{
- int error;
-
memory->dev.bus = &memory_subsys;
memory->dev.id = memory->start_section_nr / sections_per_block;
memory->dev.release = memory_block_release;
memory->dev.groups = memory_memblk_attr_groups;
memory->dev.offline = memory->state == MEM_OFFLINE;
- error = device_register(&memory->dev);
- return error;
+ return device_register(&memory->dev);
}
static int init_memory_block(struct memory_block **memory,