diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2016-05-19 18:27:25 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2016-05-20 16:36:43 -0700 |
commit | 825f79ae7620fa98586c4d2504030eca96d55c59 (patch) | |
tree | 5ce96e9395ffa41385871a8edf7de970711e43a8 /drivers/staging/greybus/fw-core.c | |
parent | 4aea5a15ad6d8fbd9d344a84c0396176e7512d3d (diff) |
greybus: fw-core: destroy connections on error
In one of the error cases we aren't destroying the connections created
earlier. Fix it.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/fw-core.c')
-rw-r--r-- | drivers/staging/greybus/fw-core.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/greybus/fw-core.c b/drivers/staging/greybus/fw-core.c index 90d32227a490..33941efe13ea 100644 --- a/drivers/staging/greybus/fw-core.c +++ b/drivers/staging/greybus/fw-core.c @@ -139,7 +139,7 @@ static int gb_fw_core_probe(struct gb_bundle *bundle, dev_err(&bundle->dev, "invalid protocol id (0x%02x)\n", protocol_id); ret = -EINVAL; - goto err_free_fw_core; + goto err_destroy_connections; } } @@ -187,7 +187,6 @@ err_destroy_connections: gb_connection_destroy(fw_core->mgmt_connection); gb_connection_destroy(fw_core->spi_connection); gb_connection_destroy(fw_core->download_connection); -err_free_fw_core: kfree(fw_core); return ret; |