Skip to contentSkip to conversation

Fix build warning in hd.c

PATCH New Felix Oxley 1 participant 1 message Oct 17, 2005

lore
Share & tools
lore
#0 lore raw

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

---

drivers/ide/legacy/hd.c renamed from drivers/ide/legacy/hd.orig +1 -1
@@ -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)