提交 d9b89ef1 编写于 作者: D David Kershner 提交者: Greg Kroah-Hartman

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: NDavid Kershner <david.kershner@unisys.com>
Reviewed-by: NTim Sell <timothy.sell@unisys.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 03662df8
...@@ -1431,22 +1431,21 @@ setup_crash_devices_work_queue(struct work_struct *work) ...@@ -1431,22 +1431,21 @@ setup_crash_devices_work_queue(struct work_struct *work)
} }
/* reuse IOVM create bus message */ /* reuse IOVM create bus message */
if (local_crash_bus_msg.cmd.create_bus.channel_addr) { if (!local_crash_bus_msg.cmd.create_bus.channel_addr) {
bus_create(&local_crash_bus_msg);
} else {
POSTCODE_LINUX(CRASH_DEV_BUS_NULL_FAILURE_PC, 0, 0, POSTCODE_LINUX(CRASH_DEV_BUS_NULL_FAILURE_PC, 0, 0,
DIAG_SEVERITY_ERR); DIAG_SEVERITY_ERR);
return; return;
} }
bus_create(&local_crash_bus_msg);
/* reuse create device message for storage device */ /* reuse create device message for storage device */
if (local_crash_dev_msg.cmd.create_device.channel_addr) { if (!local_crash_dev_msg.cmd.create_device.channel_addr) {
my_device_create(&local_crash_dev_msg);
} else {
POSTCODE_LINUX(CRASH_DEV_DEV_NULL_FAILURE_PC, 0, 0, POSTCODE_LINUX(CRASH_DEV_DEV_NULL_FAILURE_PC, 0, 0,
DIAG_SEVERITY_ERR); DIAG_SEVERITY_ERR);
return; return;
} }
my_device_create(&local_crash_dev_msg);
POSTCODE_LINUX(CRASH_DEV_EXIT_PC, 0, 0, DIAG_SEVERITY_PRINT); POSTCODE_LINUX(CRASH_DEV_EXIT_PC, 0, 0, DIAG_SEVERITY_PRINT);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册