2005-10-17 01:20:04

by Felix Oxley

[permalink] [raw]
Subject: [PATCH 1/1] Fix build warning in hd.c

From: Felix Oxley <[email protected]>

Fix:
drivers/ide/legacy/hd.c: In function ‘hd_request’:
drivers/ide/legacy/hd.c:424: warning: ‘stat’ may be used uninitialized in this function

Signed-off-by: Felix Oxley <[email protected]>
---
--- ./drivers/ide/legacy/hd.orig 2005-10-17 02:05:29.000000000 +0100
+++ ./drivers/ide/legacy/hd.c 2005-10-17 02:06:13.000000000 +0100
@@ -421,7 +421,7 @@ static void bad_rw_intr(void)

static inline int wait_DRQ(void)
{
- int retries = 100000, stat;
+ int retries = 100000, stat = 0;

while (--retries > 0)
if ((stat = inb_p(HD_STATUS)) & DRQ_STAT)