forked from luck/tmp_suning_uos_patched
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: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
This commit is contained in:
parent
1dcfdf93f6
commit
b004223db7
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user