summaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-04-30 01:17:33 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2013-04-30 03:28:15 +0200
commit8541b827451e0dd907f4a0088213b8982347ce3a (patch)
tree349a84bf43216593c7ffde689c9e18ab0bd679c6 /drivers/video
parentdrivers/video/backlight/generic_bl.c: use dev_info() instead of pr_info() (diff)
downloadlinux-8541b827451e0dd907f4a0088213b8982347ce3a.tar.xz
linux-8541b827451e0dd907f4a0088213b8982347ce3a.zip
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: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/backlight/adp8870_bl.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/video/backlight/adp8870_bl.c b/drivers/video/backlight/adp8870_bl.c
index 712c25a0d8fe..7930ab3ff4de 100644
--- a/drivers/video/backlight/adp8870_bl.c
+++ b/drivers/video/backlight/adp8870_bl.c
@@ -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);