From c463593c3dbc8d4dcb132538b0116256fa0cc455 Mon Sep 17 00:00:00 2001 From: Viresh Kumar Date: Fri, 12 Feb 2016 16:08:26 +0530 Subject: [PATCH] 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: Viresh Kumar Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- drivers/staging/greybus/raw.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/greybus/raw.c b/drivers/staging/greybus/raw.c index a6e795996053..d2e0281e86c5 100644 --- a/drivers/staging/greybus/raw.c +++ b/drivers/staging/greybus/raw.c @@ -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: -- 2.20.1