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

greybus: raw: Use consistent label names in connection_init()

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: default avatarViresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: default avatarJohan Hovold <johan@hovoldconsulting.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 7d0493d1
...@@ -174,21 +174,21 @@ static int gb_raw_connection_init(struct gb_connection *connection) ...@@ -174,21 +174,21 @@ static int gb_raw_connection_init(struct gb_connection *connection)
cdev_init(&raw->cdev, &raw_fops); cdev_init(&raw->cdev, &raw_fops);
retval = cdev_add(&raw->cdev, raw->dev, 1); retval = cdev_add(&raw->cdev, raw->dev, 1);
if (retval) if (retval)
goto error_cdev; goto error_remove_ida;
raw->device = device_create(raw_class, &connection->bundle->dev, raw->device = device_create(raw_class, &connection->bundle->dev,
raw->dev, raw, "gb!raw%d", minor); raw->dev, raw, "gb!raw%d", minor);
if (IS_ERR(raw->device)) { if (IS_ERR(raw->device)) {
retval = PTR_ERR(raw->device); retval = PTR_ERR(raw->device);
goto error_device; goto error_del_cdev;
} }
return 0; return 0;
error_device: error_del_cdev:
cdev_del(&raw->cdev); cdev_del(&raw->cdev);
error_cdev: error_remove_ida:
ida_simple_remove(&minors, minor); ida_simple_remove(&minors, minor);
error_free: error_free:
......
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