[<prev] [next>] [day] [month] [year] [list]
Message-id: <00c801ce1e3c$0d5023f0$27f06bd0$%han@samsung.com>
Date: Mon, 11 Mar 2013 18:37:30 +0900
From: Jingoo Han <jg1.han@...sung.com>
To: 'Andrew Morton' <akpm@...ux-foundation.org>
Cc: 'LKML' <linux-kernel@...r.kernel.org>,
'Richard Purdie' <rpurdie@...ys.net>,
'Jingoo Han' <jg1.han@...sung.com>
Subject: [PATCH] backlight: adp8870: add missing braces
This patch adds 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@...sung.com>
---
drivers/video/backlight/adp8870_bl.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/video/backlight/adp8870_bl.c b/drivers/video/backlight/adp8870_bl.c
index 712c25a..7930ab3 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);
--
1.7.2.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists