Commit 79c3f971 authored by David Kershner's avatar David Kershner Committed by Greg Kroah-Hartman

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: default avatarDavid Kershner <david.kershner@unisys.com>
Reported-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1d7f5522
...@@ -511,16 +511,18 @@ controlvm_respond_chipset_init(struct controlvm_message_header *msg_hdr, ...@@ -511,16 +511,18 @@ controlvm_respond_chipset_init(struct controlvm_message_header *msg_hdr,
CONTROLVM_QUEUE_REQUEST, &outmsg); CONTROLVM_QUEUE_REQUEST, &outmsg);
} }
static void static int
chipset_init(struct controlvm_message *inmsg) chipset_init(struct controlvm_message *inmsg)
{ {
static int chipset_inited; static int chipset_inited;
enum ultra_chipset_feature features = 0; enum ultra_chipset_feature features = 0;
int rc = CONTROLVM_RESP_SUCCESS; int rc = CONTROLVM_RESP_SUCCESS;
int res = 0;
POSTCODE_LINUX_2(CHIPSET_INIT_ENTRY_PC, POSTCODE_SEVERITY_INFO); POSTCODE_LINUX_2(CHIPSET_INIT_ENTRY_PC, POSTCODE_SEVERITY_INFO);
if (chipset_inited) { if (chipset_inited) {
rc = -CONTROLVM_RESP_ERROR_ALREADY_DONE; rc = -CONTROLVM_RESP_ERROR_ALREADY_DONE;
res = -EIO;
goto out_respond; goto out_respond;
} }
chipset_inited = 1; chipset_inited = 1;
...@@ -541,7 +543,9 @@ chipset_init(struct controlvm_message *inmsg) ...@@ -541,7 +543,9 @@ chipset_init(struct controlvm_message *inmsg)
out_respond: out_respond:
if (inmsg->hdr.flags.response_expected) 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 static void
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment