Commit b004223d authored by Andrew Morton's avatar Andrew Morton Committed by Bartlomiej Zolnierkiewicz

drivers/ide/legacy/hd.c: fix uninitialized var warning

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

gcc is being stupid.
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent 1dcfdf93
......@@ -421,11 +421,14 @@ static void bad_rw_intr(void)
static inline int wait_DRQ(void)
{
int retries = 100000, stat;
int retries;
int stat;
while (--retries > 0)
if ((stat = inb_p(HD_STATUS)) & DRQ_STAT)
for (retries = 0; retries < 100000; retries++) {
stat = inb_p(HD_STATUS);
if (stat & DRQ_STAT)
return 0;
}
dump_status("wait_DRQ", stat);
return -1;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment