greybus: connection: free resources properly on failures
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
This commit is contained in:
parent
b97c46ecaf
commit
a68bd742c0
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user