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

staging: unisys: visorbus: add error handling around kobject_uevent

The function kobject_uevent_env can return an error, pass that error
to the caller so it can be handled correctly.
Signed-off-by: default avatarDavid Kershner <david.kershner@unisys.com>
Reviewed-by: default avatarReviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ae0fa822
...@@ -1277,12 +1277,15 @@ parahotplug_process_message(struct controlvm_message *inmsg) ...@@ -1277,12 +1277,15 @@ parahotplug_process_message(struct controlvm_message *inmsg)
static int static int
chipset_ready_uevent(struct controlvm_message_header *msg_hdr) chipset_ready_uevent(struct controlvm_message_header *msg_hdr)
{ {
kobject_uevent(&chipset_dev->acpi_device->dev.kobj, KOBJ_ONLINE); int res;
res = kobject_uevent(&chipset_dev->acpi_device->dev.kobj,
KOBJ_ONLINE);
if (msg_hdr->flags.response_expected) if (msg_hdr->flags.response_expected)
return controlvm_respond(msg_hdr, CONTROLVM_RESP_SUCCESS); controlvm_respond(msg_hdr, res);
return 0; return res;
} }
/* /*
...@@ -1297,15 +1300,16 @@ chipset_selftest_uevent(struct controlvm_message_header *msg_hdr) ...@@ -1297,15 +1300,16 @@ chipset_selftest_uevent(struct controlvm_message_header *msg_hdr)
{ {
char env_selftest[20]; char env_selftest[20];
char *envp[] = { env_selftest, NULL }; char *envp[] = { env_selftest, NULL };
int res;
sprintf(env_selftest, "SPARSP_SELFTEST=%d", 1); sprintf(env_selftest, "SPARSP_SELFTEST=%d", 1);
kobject_uevent_env(&chipset_dev->acpi_device->dev.kobj, KOBJ_CHANGE, res = kobject_uevent_env(&chipset_dev->acpi_device->dev.kobj,
envp); KOBJ_CHANGE, envp);
if (msg_hdr->flags.response_expected) if (msg_hdr->flags.response_expected)
return controlvm_respond(msg_hdr, CONTROLVM_RESP_SUCCESS); controlvm_respond(msg_hdr, res);
return 0; return res;
} }
/* /*
...@@ -1318,12 +1322,14 @@ chipset_selftest_uevent(struct controlvm_message_header *msg_hdr) ...@@ -1318,12 +1322,14 @@ chipset_selftest_uevent(struct controlvm_message_header *msg_hdr)
static int static int
chipset_notready_uevent(struct controlvm_message_header *msg_hdr) chipset_notready_uevent(struct controlvm_message_header *msg_hdr)
{ {
kobject_uevent(&chipset_dev->acpi_device->dev.kobj, KOBJ_OFFLINE); int res;
res = kobject_uevent(&chipset_dev->acpi_device->dev.kobj,
KOBJ_OFFLINE);
if (msg_hdr->flags.response_expected) if (msg_hdr->flags.response_expected)
return controlvm_respond(msg_hdr, CONTROLVM_RESP_SUCCESS); controlvm_respond(msg_hdr, res);
return 0; return res;
} }
static unsigned int static unsigned int
......
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