]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
staging: unisys: visorbus: bus_responder add error handling
authorDavid Kershner <david.kershner@unisys.com>
Mon, 21 Nov 2016 17:15:49 +0000 (12:15 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Nov 2016 09:01:57 +0000 (10:01 +0100)
Controlvm_respond now returns an error. Add error handling to the
bus_responder function.

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>
drivers/staging/unisys/visorbus/visorchipset.c

index 034ff91ead5d527c1d7a3b1b615de0ec35ae2245..a10e41aa5d62f36ca199ce6d260402326d6206c8 100644 (file)
@@ -638,18 +638,18 @@ save_crash_message(struct controlvm_message *msg, enum crash_obj_type typ)
        return 0;
 }
 
-static void
+static int
 bus_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 void