ide: remove redundant hwif->present check from ide_register_hw()

We check earlier for hwif->present and call ide_unregister() if necessary
(after ide_unregister() hwif->present will be always cleared).
Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
上级 1bee4d1d
......@@ -720,8 +720,6 @@ int ide_register_hw(hw_regs_t *hw, void (*quirkproc)(ide_drive_t *),
ide_init_port_data(hwif, index);
init_hwif_default(hwif, index);
}
if (hwif->present)
return -1;
ide_init_port_hw(hwif, hw);
hwif->quirkproc = quirkproc;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册