[PATCH v2 07/14] staging: unisys: visorbus: controlvm_respond add error handling
David Kershner
david.kershner at unisys.com
Mon Nov 21 17:15:46 UTC 2016
The function visorchanel_signalinsert now returns an error, propagate
the error up the stack to be handled.
Signed-off-by: David Kershner <david.kershner at unisys.com>
Reported-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
---
drivers/staging/unisys/visorbus/visorchipset.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c
index 331f6b1..0c454f6 100644
--- a/drivers/staging/unisys/visorbus/visorchipset.c
+++ b/drivers/staging/unisys/visorbus/visorchipset.c
@@ -548,19 +548,17 @@ struct visor_device *visorbus_get_device_by_id(u32 bus_no, u32 dev_no,
return res;
}
-static void
+static int
controlvm_respond(struct controlvm_message_header *msg_hdr, int response)
{
struct controlvm_message outmsg;
controlvm_init_response(&outmsg, msg_hdr, response);
if (outmsg.hdr.flags.test_message == 1)
- return;
+ return -EINVAL;
- if (visorchannel_signalinsert(controlvm_channel,
- CONTROLVM_QUEUE_REQUEST, &outmsg)) {
- return;
- }
+ return visorchannel_signalinsert(controlvm_channel,
+ CONTROLVM_QUEUE_REQUEST, &outmsg);
}
static void controlvm_respond_physdev_changestate(
--
1.9.1
More information about the devel
mailing list