Commit a68bd742 authored by Viresh Kumar's avatar Viresh Kumar Committed by Greg Kroah-Hartman

greybus: connection: free resources properly on failures

Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: default avatarAlex Elder <elder@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent b97c46ec
...@@ -199,6 +199,7 @@ struct gb_connection *gb_connection_create(struct gb_interface *interface, ...@@ -199,6 +199,7 @@ struct gb_connection *gb_connection_create(struct gb_interface *interface,
gb_connection_hd_cport_id_free(connection); gb_connection_hd_cport_id_free(connection);
gb_protocol_put(connection->protocol); gb_protocol_put(connection->protocol);
put_device(&connection->dev); put_device(&connection->dev);
kfree(connection);
return NULL; return NULL;
} }
......
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