On Monday 23 October 2006 23:26, David Rientjes wrote:Damn it, my brain seems to be non-functional tonight.
> On Mon, 23 Oct 2006, Jesper Juhl wrote:
>
> > The variable 'j' is used uninitialized in the loop. Fix by initializing it to zero.
> >
[snip]
>
> I doubt this patch compile tested.
>
You are right. I hang my head in shame and admit I did not compile test this one.
Fixed patch below.
Signed-off-by: Jesper Juhl <jesper.juhl@xxxxxxxxx>
---
drivers/video/sis/init301.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/video/sis/init301.c b/drivers/video/sis/init301.c
index f13fadd..45a5969 100644
--- a/drivers/video/sis/init301.c
+++ b/drivers/video/sis/init301.c
@@ -445,7 +445,8 @@ #endif
void
SiS_DDC2Delay(struct SiS_Private *SiS_Pr, unsigned int delaytime)
{
- unsigned int i, j;
+ unsigned int i;
+ unsigned int j = 0;
for(i = 0; i < delaytime; i++) {
j += SiS_GetReg(SiS_Pr->SiS_P3c4,0x05);