[PATCH] drivers/ide/ide-probe.c: uninitialized variable 'rc'

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-kernel@...>
Cc: <mingo@...>, Steven Noonan <steven@...>
Date: Tuesday, September 9, 2008 - 5:07 pm

Fixed the warning by initializing 'rc' to zero.

Signed-off-by: Steven Noonan <steven@uplinklabs.net>
---
 drivers/ide/ide-probe.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index 994e410..e53c645 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -1492,7 +1492,7 @@ static struct device_attribute *ide_port_attrs[] = {
 
 static int ide_sysfs_register_port(ide_hwif_t *hwif)
 {
-	int i, rc;
+	int i, rc = 0;
 
 	for (i = 0; ide_port_attrs[i]; i++) {
 		rc = device_create_file(hwif->portdev, ide_port_attrs[i]);
-- 
1.6.0.1

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] drivers/ide/ide-probe.c: uninitialized variable 'rc', Steven Noonan, (Tue Sep 9, 5:07 pm)
Re: [PATCH] drivers/ide/ide-probe.c: uninitialized variable ..., Bartlomiej Zolnierkiewicz..., (Wed Sep 10, 5:09 pm)
Re: [PATCH] drivers/ide/ide-probe.c: uninitialized variable ..., Bartlomiej Zolnierkiewicz..., (Sat Sep 27, 11:40 am)
Re: [PATCH] drivers/ide/ide-probe.c: uninitialized variable ..., Bartlomiej Zolnierkiewicz..., (Sun Oct 5, 12:14 pm)