Commit 8541b827 authored by Jingoo Han's avatar Jingoo Han Committed by Linus Torvalds

drivers/video/backlight/adp8870_bl.c: add missing braces

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: default avatarJingoo Han <jg1.han@samsung.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 8ab5aa67
...@@ -895,14 +895,14 @@ static int adp8870_probe(struct i2c_client *client, ...@@ -895,14 +895,14 @@ static int adp8870_probe(struct i2c_client *client,
data->bl = bl; data->bl = bl;
if (pdata->en_ambl_sens) if (pdata->en_ambl_sens) {
ret = sysfs_create_group(&bl->dev.kobj, ret = sysfs_create_group(&bl->dev.kobj,
&adp8870_bl_attr_group); &adp8870_bl_attr_group);
if (ret) { if (ret) {
dev_err(&client->dev, "failed to register sysfs\n"); dev_err(&client->dev, "failed to register sysfs\n");
goto out1; goto out1;
} }
}
ret = adp8870_bl_setup(bl); ret = adp8870_bl_setup(bl);
if (ret) { if (ret) {
......
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