Commit e65f57e8 authored by Jean Delvare's avatar Jean Delvare Committed by Bartlomiej Zolnierkiewicz

[ide] fix hwif_init() to not return error for "empty" interfaces

Return success if no device is connected to the interface.
Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent f69229f5
...@@ -1248,8 +1248,9 @@ static int hwif_init(ide_hwif_t *hwif) ...@@ -1248,8 +1248,9 @@ static int hwif_init(ide_hwif_t *hwif)
{ {
int old_irq, unit; int old_irq, unit;
/* Return success if no device is connected */
if (!hwif->present) if (!hwif->present)
return 0; return 1;
if (!hwif->irq) { if (!hwif->irq) {
if (!(hwif->irq = ide_default_irq(hwif->io_ports[IDE_DATA_OFFSET]))) if (!(hwif->irq = ide_default_irq(hwif->io_ports[IDE_DATA_OFFSET])))
......
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