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>
dev_err(&bundle->dev, "invalid protocol id (0x%02x)\n",
protocol_id);
ret = -EINVAL;
- goto err_free_fw_core;
+ goto 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;