s390x/ipl: Improved code indentation in s390_ipl_init()

The indentation of the code in s390_ipl_init() can be simplified
a little bit by removing superfluous else-statements.

Suggested-by: Michael Mueller <mimu@linux.vnet.ibm.com>
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
This commit is contained in:
Thomas Huth 2014-02-11 09:12:27 +01:00 committed by Cornelia Huck
parent 68540b1a1b
commit 7691993c2b
1 changed files with 25 additions and 24 deletions

View File

@ -62,6 +62,7 @@ typedef struct S390IPLState {
static int s390_ipl_init(SysBusDevice *dev) static int s390_ipl_init(SysBusDevice *dev)
{ {
S390IPLState *ipl = S390_IPL(dev); S390IPLState *ipl = S390_IPL(dev);
uint64_t pentry = KERN_IMAGE_START;
int kernel_size; int kernel_size;
if (!ipl->kernel) { if (!ipl->kernel) {
@ -94,8 +95,8 @@ static int s390_ipl_init(SysBusDevice *dev)
hw_error("could not load bootloader '%s'\n", bios_name); hw_error("could not load bootloader '%s'\n", bios_name);
} }
return 0; return 0;
} else { }
uint64_t pentry = KERN_IMAGE_START;
kernel_size = load_elf(ipl->kernel, NULL, NULL, &pentry, NULL, kernel_size = load_elf(ipl->kernel, NULL, NULL, &pentry, NULL,
NULL, 1, ELF_MACHINE, 0); NULL, 1, ELF_MACHINE, 0);
if (kernel_size < 0) { if (kernel_size < 0) {
@ -118,7 +119,7 @@ static int s390_ipl_init(SysBusDevice *dev)
} else { } else {
ipl->start_addr = pentry; ipl->start_addr = pentry;
} }
}
if (ipl->initrd) { if (ipl->initrd) {
ram_addr_t initrd_offset; ram_addr_t initrd_offset;
int initrd_size; int initrd_size;