diff options
| author | Benjamin Romer <benjamin.romer@unisys.com> | 2014-12-05 17:08:44 -0500 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-01-09 17:30:20 -0800 |
| commit | 20eca8f096867fdbd890a8c16a05fb0bd9a7ca06 (patch) | |
| tree | af387bafa38197efaf9d418198d5476e698660c2 | |
| parent | dddfe8e652bfae1bddb1626735bcb9714019c8d9 (diff) | |
staging: unisys: refactor create_bus()
Fix the missing braces and logical continuation problems in create_bus().
Signed-off-by: Ken Depro <kenneth.depro@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -rw-r--r-- | drivers/staging/unisys/uislib/uislib.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/staging/unisys/uislib/uislib.c b/drivers/staging/unisys/uislib/uislib.c index f25dd2fa1868..1ddbe78999ae 100644 --- a/drivers/staging/unisys/uislib/uislib.c +++ b/drivers/staging/unisys/uislib/uislib.c @@ -192,8 +192,10 @@ create_bus(struct controlvm_message *msg, char *buf) bus->guest_handle = 0; bus->bus_no = busNo; bus->local_vnic = 1; - } else - bus->bus_no = bus->guest_handle = busNo; + } else { + bus->bus_no = busNo; + bus->guest_handle = busNo; + } sprintf(bus->name, "%d", (int)bus->bus_no); bus->device_count = deviceCount; bus->device = @@ -220,8 +222,8 @@ create_bus(struct controlvm_message *msg, char *buf) kfree(bus); return CONTROLVM_RESP_ERROR_ALREADY_DONE; } - if ((msg->cmd.create_bus.channel_addr != 0) - && (msg->cmd.create_bus.channel_bytes != 0)) { + if ((msg->cmd.create_bus.channel_addr != 0) && + (msg->cmd.create_bus.channel_bytes != 0)) { bus->bus_channel_bytes = msg->cmd.create_bus.channel_bytes; bus->bus_channel = init_vbus_channel(msg->cmd.create_bus.channel_addr, @@ -256,9 +258,9 @@ create_bus(struct controlvm_message *msg, char *buf) /* add bus at the head of our list */ write_lock(&BusListLock); - if (!BusListHead) + if (!BusListHead) { BusListHead = bus; - else { + } else { bus->next = BusListHead; BusListHead = bus; } |
