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

staging: unisys: visorbus: Split else if blocks into multiple if.

Visorbus_configure had a block of "else if" clauses at the beginning of the
function. Simplify this to just being "if" clauses since each code block
ended with a goto.
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>
上级 4d77e606
...@@ -717,10 +717,12 @@ static int visorbus_configure(struct controlvm_message *inmsg, ...@@ -717,10 +717,12 @@ static int visorbus_configure(struct controlvm_message *inmsg,
if (!bus_info) { if (!bus_info) {
err = -EINVAL; err = -EINVAL;
goto err_respond; goto err_respond;
} else if (bus_info->state.created == 0) { }
if (bus_info->state.created == 0) {
err = -EINVAL; err = -EINVAL;
goto err_respond; goto err_respond;
} else if (bus_info->pending_msg_hdr) { }
if (bus_info->pending_msg_hdr) {
err = -EIO; err = -EIO;
goto err_respond; goto err_respond;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册