diff options
author | 2016-11-21 12:15:51 -0500 | |
---|---|---|
committer | 2016-11-23 10:01:57 +0100 | |
commit | 29b2780974767df4006d9b8cc7d412d23d99e9a7 (patch) | |
tree | de6c9e29d977db0050b1bd36869a1ac921e6a62c | |
parent | staging: unisys: visorbus: device_changestate_responder add error handling (diff) | |
download | wireguard-linux-29b2780974767df4006d9b8cc7d412d23d99e9a7.tar.xz wireguard-linux-29b2780974767df4006d9b8cc7d412d23d99e9a7.zip |
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: David Kershner <david.kershner@unisys.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/unisys/visorbus/visorchipset.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c index f740b52482cd..50e245ed23e9 100644 --- a/drivers/staging/unisys/visorbus/visorchipset.c +++ b/drivers/staging/unisys/visorbus/visorchipset.c @@ -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 |