Commit 29b27809 authored by David Kershner's avatar David Kershner Committed by Greg Kroah-Hartman

staging: unisys: visorbus: device_responder add error handling

The function controlvm_respond returns proper error handling, so now we
can propagate the error up and handle it appropriately.
Signed-off-by: default avatarDavid Kershner <david.kershner@unisys.com>
Reported-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 68f99d49
......@@ -676,18 +676,18 @@ device_changestate_responder(enum controlvm_id cmd_id,
CONTROLVM_QUEUE_REQUEST, &outmsg);
}
static void
static int
device_responder(enum controlvm_id cmd_id,
struct controlvm_message_header *pending_msg_hdr,
int response)
{
if (!pending_msg_hdr)
return; /* no controlvm response needed */
return -EIO;
if (pending_msg_hdr->id != (u32)cmd_id)
return;
return -EINVAL;
controlvm_respond(pending_msg_hdr, response);
return controlvm_respond(pending_msg_hdr, response);
}
static int
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment