greybus: connection: fix jump label on device_add failure
authorBryan O'Donoghue <bryan.odonoghue@linaro.org>
Tue, 11 Aug 2015 12:50:50 +0000 (13:50 +0100)
committerGreg Kroah-Hartman <gregkh@google.com>
Wed, 12 Aug 2015 03:00:40 +0000 (20:00 -0700)
On device_add() failure in gb_connection_create_range() we jump to
err_remove_ida. Instead we should be jumping to err_free_connection, so
change the flow to accomodate.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/connection.c

index 88383b6e603f5183b3df680cffcb92134be80f56..3765aa87ef2de7a9746b7287d8ad8b47d26daab7 100644 (file)
@@ -238,7 +238,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_remove_ida;
+               goto err_free_connection;
        }
 
        spin_lock_irq(&gb_connections_lock);