ide: fix buggy code in ide_register_hw()
Relocating the index to come after finding the hwif pointer.
Signed-off-by: Peter Teoh <htmldeveloper@gmail.com>
Reported-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
authored by Peter Teoh and committed by Bartlomiej Zolnierkiewicz 0c6025d4 ef4298d0