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)
|
static inline int wait_DRQ(void)
|
||||||
{
|
{
|
||||||
int retries = 100000, stat;
|
int retries;
|
||||||
|
int stat;
|
||||||
|
|
||||||
while (--retries > 0)
|
for (retries = 0; retries < 100000; retries++) {
|
||||||
if ((stat = inb_p(HD_STATUS)) & DRQ_STAT)
|
stat = inb_p(HD_STATUS);
|
||||||
|
if (stat & DRQ_STAT)
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
dump_status("wait_DRQ", stat);
|
dump_status("wait_DRQ", stat);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user