diff options
author | David Kershner | 2017-03-28 15:34:35 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2017-03-29 09:17:02 +0200 |
commit | 621f5e185200a9d68662301cfcce08b33d23f071 (patch) | |
tree | 5fe417ad54e05944496d51eaa5e38306b176883f /drivers/staging/unisys/visorbus/visorchipset.c | |
parent | staging: unisys: visorbus: remaining_steps convert ret to err (diff) | |
download | kernel-qcow2-linux-621f5e185200a9d68662301cfcce08b33d23f071.tar.gz kernel-qcow2-linux-621f5e185200a9d68662301cfcce08b33d23f071.tar.xz kernel-qcow2-linux-621f5e185200a9d68662301cfcce08b33d23f071.zip |
staging: unisys: visorbus: add error handling to chipset_bus_create
The function chipset_bus_create should return an error. If an error
is returned, it is assumed the response has not been sent by bus_create.
Correctly handle when the error has been returned in visorchipset.
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>
Diffstat (limited to 'drivers/staging/unisys/visorbus/visorchipset.c')
-rw-r--r-- | drivers/staging/unisys/visorbus/visorchipset.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c index d617ba1445ab..d7ddf55f97c1 100644 --- a/drivers/staging/unisys/visorbus/visorchipset.c +++ b/drivers/staging/unisys/visorbus/visorchipset.c @@ -656,11 +656,17 @@ bus_create(struct controlvm_message *inmsg) bus_info->visorchannel = visorchannel; /* Response will be handled by chipset_bus_create */ - chipset_bus_create(bus_info); + err = chipset_bus_create(bus_info); + /* If error chipset_bus_create didn't respond, need to respond here */ + if (err) + goto err_destroy_channel; POSTCODE_LINUX(BUS_CREATE_EXIT_PC, 0, bus_no, DIAG_SEVERITY_PRINT); return 0; +err_destroy_channel: + visorchannel_destroy(visorchannel); + err_free_pending_msg: kfree(bus_info->pending_msg_hdr); |