]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drivers/video/backlight/adp8870_bl.c: add missing braces
authorJingoo Han <jg1.han@samsung.com>
Wed, 20 Mar 2013 04:07:38 +0000 (15:07 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 20 Mar 2013 04:22:57 +0000 (15:22 +1100)
Add missing braces to include error message.  The error message is related
to the return value for sysfs_create_group().  However,
sysfs_create_group() is called when pdata->en_ambl_sens is not zero.
Thus, the checking return value should be included in the if statement.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/video/backlight/adp8870_bl.c

index 712c25a0d8fedc9ff26138a2224b488b037828f3..7930ab3ff4deacb96092c1bf0887d46eddc79bef 100644 (file)
@@ -895,13 +895,13 @@ static int adp8870_probe(struct i2c_client *client,
 
        data->bl = bl;
 
-       if (pdata->en_ambl_sens)
+       if (pdata->en_ambl_sens) {
                ret = sysfs_create_group(&bl->dev.kobj,
                        &adp8870_bl_attr_group);
-
-       if (ret) {
-               dev_err(&client->dev, "failed to register sysfs\n");
-               goto out1;
+               if (ret) {
+                       dev_err(&client->dev, "failed to register sysfs\n");
+                       goto out1;
+               }
        }
 
        ret = adp8870_bl_setup(bl);