This patch removes goto err_dev, which makes code a bit smaller.

Cc: Milo(Woogyom) Kim <milo....@ti.com>
Cc: Richard Purdie <rpur...@rpsys.net>
Signed-off-by: Jingoo Han <jg1....@samsung.com>
---
 drivers/video/backlight/lp855x_bl.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/video/backlight/lp855x_bl.c 
b/drivers/video/backlight/lp855x_bl.c
index aa6d4f7..c629fa8 100644
--- a/drivers/video/backlight/lp855x_bl.c
+++ b/drivers/video/backlight/lp855x_bl.c
@@ -272,14 +272,14 @@ static int lp855x_probe(struct i2c_client *cl, const 
struct i2c_device_id *id)
        if (ret) {
                dev_err(lp->dev, "i2c communication err: %d", ret);
                if (mode == REGISTER_BASED)
-                       goto err_dev;
+                       return ret;
        }
 
        ret = lp855x_backlight_register(lp);
        if (ret) {
                dev_err(lp->dev,
                        "failed to register backlight. err: %d\n", ret);
-               goto err_dev;
+               return ret;
        }
 
        ret = sysfs_create_group(&lp->dev->kobj, &lp855x_attr_group);
@@ -293,7 +293,6 @@ static int lp855x_probe(struct i2c_client *cl, const struct 
i2c_device_id *id)
 
 err_sysfs:
        lp855x_backlight_unregister(lp);
-err_dev:
        return ret;
 }
 
-- 
1.7.1


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to