greybus: connection: Don't free resources freed by gb_connection_release()
authorViresh Kumar <viresh.kumar@linaro.org>
Thu, 13 Aug 2015 05:10:28 +0000 (10:40 +0530)
committerGreg Kroah-Hartman <gregkh@google.com>
Fri, 14 Aug 2015 02:19:31 +0000 (19:19 -0700)
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: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/connection.c

index d0f499d509ba10ae346757d75cbc9d96a0f3655e..7eb28680e49804e952d0035bd4e185794c113eba 100644 (file)
@@ -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",
                        cport_id);
 
-               goto err_free_kfifo;
+               goto err_remove_ida;
        }
 
        spin_lock_irq(&gb_connections_lock);
@@ -296,8 +296,6 @@ gb_connection_create_range(struct greybus_host_device *hd,
 
        return connection;
 
-err_free_kfifo:
-       kfifo_free(&connection->ts_kfifo);
 err_destroy_wq:
        destroy_workqueue(connection->wq);
 err_free_connection: