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

greybus: connection: Don't free resources freed by gb_connection_release()

We are already doing put_device() here and so don't need to free
resources directly, except ida.

Fixes: afde17fe0b61 ("greybus/connection: fix jump label on device_add failure")
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 22322c47
...@@ -270,7 +270,7 @@ gb_connection_create_range(struct greybus_host_device *hd, ...@@ -270,7 +270,7 @@ gb_connection_create_range(struct greybus_host_device *hd,
pr_err("failed to add connection device for cport 0x%04hx\n", pr_err("failed to add connection device for cport 0x%04hx\n",
cport_id); cport_id);
goto err_free_kfifo; goto err_remove_ida;
} }
spin_lock_irq(&gb_connections_lock); spin_lock_irq(&gb_connections_lock);
...@@ -296,8 +296,6 @@ gb_connection_create_range(struct greybus_host_device *hd, ...@@ -296,8 +296,6 @@ gb_connection_create_range(struct greybus_host_device *hd,
return connection; return connection;
err_free_kfifo:
kfifo_free(&connection->ts_kfifo);
err_destroy_wq: err_destroy_wq:
destroy_workqueue(connection->wq); destroy_workqueue(connection->wq);
err_free_connection: err_free_connection:
......
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