diff options
author | David Kershner <david.kershner@unisys.com> | 2017-04-18 16:55:21 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-04-28 11:51:20 +0200 |
commit | d9b89ef189a876a37032b8cc1fea4a80018d371d (patch) | |
tree | 8731df8ad209265e031701994b3a368c2e668ad6 /drivers/staging/unisys | |
parent | 03662df8114fa74cbd4e993c7e0ca1360db603a3 (diff) |
staging: unisys: visorbus: refactor setup_crash_devices_work_queue
The if statement was sending us down the happy path with the error path
in the else. This can be simplified by having the if be the error and
just falling through with the good path.
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/unisys')
-rw-r--r-- | drivers/staging/unisys/visorbus/visorchipset.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c index 6fc89804a88e..ec8fc0b6d0c8 100644 --- a/drivers/staging/unisys/visorbus/visorchipset.c +++ b/drivers/staging/unisys/visorbus/visorchipset.c @@ -1431,22 +1431,21 @@ setup_crash_devices_work_queue(struct work_struct *work) } /* reuse IOVM create bus message */ - if (local_crash_bus_msg.cmd.create_bus.channel_addr) { - bus_create(&local_crash_bus_msg); - } else { + if (!local_crash_bus_msg.cmd.create_bus.channel_addr) { POSTCODE_LINUX(CRASH_DEV_BUS_NULL_FAILURE_PC, 0, 0, DIAG_SEVERITY_ERR); return; } + bus_create(&local_crash_bus_msg); /* reuse create device message for storage device */ - if (local_crash_dev_msg.cmd.create_device.channel_addr) { - my_device_create(&local_crash_dev_msg); - } else { + if (!local_crash_dev_msg.cmd.create_device.channel_addr) { POSTCODE_LINUX(CRASH_DEV_DEV_NULL_FAILURE_PC, 0, 0, DIAG_SEVERITY_ERR); return; } + my_device_create(&local_crash_dev_msg); + POSTCODE_LINUX(CRASH_DEV_EXIT_PC, 0, 0, DIAG_SEVERITY_PRINT); } |