diff options
author | Seth Jennings <sjenning@linux.vnet.ibm.com> | 2013-08-20 13:12:58 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-21 14:47:39 -0400 |
commit | 879f1bec8e136c7bc71e38715e62a73b75f91d78 (patch) | |
tree | ba67a0123e485f6494185a92938741926830f549 /drivers | |
parent | b1eaef3da5a7bbc48fa9dbefaa2a28e45367fdb1 (diff) |
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')
-rw-r--r-- | drivers/base/memory.c | 5 |
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[] = { | |||
565 | static | 565 | static |
566 | int register_memory(struct memory_block *memory) | 566 | int register_memory(struct memory_block *memory) |
567 | { | 567 | { |
568 | int error; | ||
569 | |||
570 | memory->dev.bus = &memory_subsys; | 568 | memory->dev.bus = &memory_subsys; |
571 | memory->dev.id = memory->start_section_nr / sections_per_block; | 569 | memory->dev.id = memory->start_section_nr / sections_per_block; |
572 | memory->dev.release = memory_block_release; | 570 | memory->dev.release = memory_block_release; |
573 | memory->dev.groups = memory_memblk_attr_groups; | 571 | memory->dev.groups = memory_memblk_attr_groups; |
574 | memory->dev.offline = memory->state == MEM_OFFLINE; | 572 | memory->dev.offline = memory->state == MEM_OFFLINE; |
575 | 573 | ||
576 | error = device_register(&memory->dev); | 574 | return device_register(&memory->dev); |
577 | return error; | ||
578 | } | 575 | } |
579 | 576 | ||
580 | static int init_memory_block(struct memory_block **memory, | 577 | static int init_memory_block(struct memory_block **memory, |