staging: unisys: visorbus: parahotplug_process_message add error handling
authorDavid Kershner <david.kershner@unisys.com>
Tue, 28 Mar 2017 13:34:18 +0000 (09:34 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Mar 2017 07:17:02 +0000 (09:17 +0200)
Add error handling to the parahotplug_process_message function so that it
returns the proper error.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/unisys/visorbus/visorchipset.c

index 46c5a93aa8a0af0b2d749fcee23fc4fce2410e6f..9c0a07f403b07c88615c918774f228454e4b05d0 100644 (file)
@@ -1211,7 +1211,7 @@ parahotplug_request_kickoff(struct parahotplug_request *req)
  *                                 off a udev script
  * @inmsg: the message indicating whether to enable or disable
  */
-static void
+static int
 parahotplug_process_message(struct controlvm_message *inmsg)
 {
        struct parahotplug_request *req;
@@ -1219,7 +1219,7 @@ parahotplug_process_message(struct controlvm_message *inmsg)
        req = parahotplug_request_create(inmsg);
 
        if (!req)
-               return;
+               return -ENOMEM;
 
        if (inmsg->cmd.device_change_state.state.active) {
                /*
@@ -1252,6 +1252,7 @@ parahotplug_process_message(struct controlvm_message *inmsg)
 
                parahotplug_request_kickoff(req);
        }
+       return 0;
 }
 
 /*