drivers/video/backlight/lm3630_bl.c: remove ret = -EIO of lm3630_backlight_register()
authorJingoo Han <jg1.han@samsung.com>
Fri, 22 Feb 2013 00:44:02 +0000 (16:44 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 22 Feb 2013 01:22:25 +0000 (17:22 -0800)
There is no need to return -EIO, because backlight_device_register()
already returns correct error values.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Daniel Jeong <daniel.jeong@ti.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/video/backlight/lm3630_bl.c

index a6d637b5c68f2dc7d2c69e4868726e6d52768a2f..76a62e978fc30e446a06e66a45a5a5b8530656e0 100644 (file)
@@ -320,7 +320,7 @@ static int lm3630_backlight_register(struct lm3630_chip_data *pchip,
                    backlight_device_register(name, pchip->dev, pchip,
                                              &lm3630_bank_a_ops, &props);
                if (IS_ERR(pchip->bled1))
                    backlight_device_register(name, pchip->dev, pchip,
                                              &lm3630_bank_a_ops, &props);
                if (IS_ERR(pchip->bled1))
-                       return -EIO;
+                       return PTR_ERR(pchip->bled1);
                break;
        case BLED_2:
                props.brightness = pdata->init_brt_led2;
                break;
        case BLED_2:
                props.brightness = pdata->init_brt_led2;
@@ -329,7 +329,7 @@ static int lm3630_backlight_register(struct lm3630_chip_data *pchip,
                    backlight_device_register(name, pchip->dev, pchip,
                                              &lm3630_bank_b_ops, &props);
                if (IS_ERR(pchip->bled2))
                    backlight_device_register(name, pchip->dev, pchip,
                                              &lm3630_bank_b_ops, &props);
                if (IS_ERR(pchip->bled2))
-                       return -EIO;
+                       return PTR_ERR(pchip->bled2);
                break;
        }
        return 0;
                break;
        }
        return 0;