diff options
author | David Kershner <david.kershner@unisys.com> | 2016-11-21 12:15:45 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-11-23 10:01:56 +0100 |
commit | 79c3f971d9ba718db6533c85b6d09edc6e47cd69 (patch) | |
tree | 84552668d5b360b43ce214a2fb7964e27913d0f1 | |
parent | 1d7f5522036c28e7cc809531de2354eb52b9a623 (diff) | |
download | linux-79c3f971d9ba718db6533c85b6d09edc6e47cd69.tar.bz2 |
staging: unisys: visorbus: chipset_init add error handling
Controlvm_respond_chipset_init now errors out correctly. Pass the errors
back up to the stack to be processed.
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, 6 insertions, 2 deletions
diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c index e982a46ef1ce..331f6b1929b8 100644 --- a/drivers/staging/unisys/visorbus/visorchipset.c +++ b/drivers/staging/unisys/visorbus/visorchipset.c @@ -511,16 +511,18 @@ controlvm_respond_chipset_init(struct controlvm_message_header *msg_hdr, CONTROLVM_QUEUE_REQUEST, &outmsg); } -static void +static int chipset_init(struct controlvm_message *inmsg) { static int chipset_inited; enum ultra_chipset_feature features = 0; int rc = CONTROLVM_RESP_SUCCESS; + int res = 0; POSTCODE_LINUX_2(CHIPSET_INIT_ENTRY_PC, POSTCODE_SEVERITY_INFO); if (chipset_inited) { rc = -CONTROLVM_RESP_ERROR_ALREADY_DONE; + res = -EIO; goto out_respond; } chipset_inited = 1; @@ -541,7 +543,9 @@ chipset_init(struct controlvm_message *inmsg) out_respond: if (inmsg->hdr.flags.response_expected) - controlvm_respond_chipset_init(&inmsg->hdr, rc, features); + res = controlvm_respond_chipset_init(&inmsg->hdr, rc, features); + + return res; } static void |