From: Viresh Kumar Date: Thu, 13 Nov 2014 12:44:39 +0000 (+0530) Subject: greybus: connection: free resources properly on failures X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a68bd742c068924950d17e2c5122fb9e710360ed;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git greybus: connection: free resources properly on failures Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/greybus/connection.c b/drivers/staging/greybus/connection.c index 5373f44b08c1..32f1ec55b48f 100644 --- a/drivers/staging/greybus/connection.c +++ b/drivers/staging/greybus/connection.c @@ -199,6 +199,7 @@ struct gb_connection *gb_connection_create(struct gb_interface *interface, gb_connection_hd_cport_id_free(connection); gb_protocol_put(connection->protocol); put_device(&connection->dev); + kfree(connection); return NULL; }