[PATCH][MIPS] fix uninitialized variable in titan_i2c_xfer()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Ralf,

This patch has fixed the problem of the initialization of variable.
The bytes is used uninitialized in titan_i2c_xfer().

Yoichi

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@xxxxxxxxxxxxxx>

diff -pruN -X mips/Documentation/dontdiff mips-orig/arch/mips/pmc-sierra/yosemite/i2c-yosemite.c mips/arch/mips/pmc-sierra/yosemite/i2c-yosemite.c
--- mips-orig/arch/mips/pmc-sierra/yosemite/i2c-yosemite.c	2006-10-31 09:48:05.213843250 +0900
+++ mips/arch/mips/pmc-sierra/yosemite/i2c-yosemite.c	2006-10-31 13:19:11.495169500 +0900
@@ -74,7 +74,7 @@ static int titan_i2c_poll(void)
 int titan_i2c_xfer(unsigned int slave_addr, titan_i2c_command * cmd,
 		   int size, unsigned int *addr)
 {
-	int loop = 0, bytes, i;
+	int loop, bytes = 0, i;
 	unsigned int *write_data, data, *read_data;
 	unsigned long reg_val, val;
 


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux