linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] video: backlight: adp5520: fix compiler warning in adp5520_show
@ 2013-03-08 19:31 Devendra Naga
  2013-03-08 21:01 ` Andrew Morton
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Devendra Naga @ 2013-03-08 19:31 UTC (permalink / raw)
  To: linux-fbdev

while compiling with make W=1 (gcc gcc (GCC) 4.7.2 20121109 (Red Hat 4.7.2-8))

found the following warning

drivers/video/backlight/adp5520_bl.c: In function ‘adp5520_show’:
drivers/video/backlight/adp5520_bl.c:146:6: warning: variable ‘error’ set but not used [-Wunused-but-set-variable]

fixed by removing the variable

Cc: Jingoo Han <jg1.han@samsung.com>
Cc: Michael Hennerich <michael.hennerich@analog.com>
Cc: Richard Purdie <rpurdie@rpsys.net>

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
---
 drivers/video/backlight/adp5520_bl.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/video/backlight/adp5520_bl.c b/drivers/video/backlight/adp5520_bl.c
index a1e41d4..9f8b20b 100644
--- a/drivers/video/backlight/adp5520_bl.c
+++ b/drivers/video/backlight/adp5520_bl.c
@@ -143,11 +143,10 @@ static int adp5520_bl_setup(struct backlight_device *bl)
 static ssize_t adp5520_show(struct device *dev, char *buf, int reg)
 {
 	struct adp5520_bl *data = dev_get_drvdata(dev);
-	int error;
 	uint8_t reg_val;
 
 	mutex_lock(&data->lock);
-	error = adp5520_read(data->master, reg, &reg_val);
+	adp5520_read(data->master, reg, &reg_val);
 	mutex_unlock(&data->lock);
 
 	return sprintf(buf, "%u\n", reg_val);
-- 
1.8.1.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-03-11  6:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-08 19:31 [PATCH 1/3] video: backlight: adp5520: fix compiler warning in adp5520_show Devendra Naga
2013-03-08 21:01 ` Andrew Morton
2013-03-11  0:56 ` Jingoo Han
2013-03-11  6:16 ` devendra.aaru
2013-03-11  6:18 ` devendra.aaru

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).