greybus: raw: Use consistent label names in connection_init()
authorViresh Kumar <viresh.kumar@linaro.org>
Fri, 12 Feb 2016 10:38:26 +0000 (16:08 +0530)
committerGreg Kroah-Hartman <gregkh@google.com>
Mon, 15 Feb 2016 22:51:20 +0000 (14:51 -0800)
Some of the labels are named based on what they are going to undo, while
others are based on where we failed in connection_init().

Follow only the first type of naming.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/raw.c

index a6e79599605370cc7c5f2b2b2ce5f1e58ca13496..d2e0281e86c5dd17c57970491812b45452e5a22d 100644 (file)
@@ -174,21 +174,21 @@ static int gb_raw_connection_init(struct gb_connection *connection)
        cdev_init(&raw->cdev, &raw_fops);
        retval = cdev_add(&raw->cdev, raw->dev, 1);
        if (retval)
-               goto error_cdev;
+               goto error_remove_ida;
 
        raw->device = device_create(raw_class, &connection->bundle->dev,
                                    raw->dev, raw, "gb!raw%d", minor);
        if (IS_ERR(raw->device)) {
                retval = PTR_ERR(raw->device);
-               goto error_device;
+               goto error_del_cdev;
        }
 
        return 0;
 
-error_device:
+error_del_cdev:
        cdev_del(&raw->cdev);
 
-error_cdev:
+error_remove_ida:
        ida_simple_remove(&minors, minor);
 
 error_free: