[PATCH] Fix ide-disk.c oops caused by hwif == NULL
1. Move hwif_to_node to ide.h 2. Use hwif_to_node in ide-disk.c Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
aeb3f76350
commit
86b3786078
@ -1220,7 +1220,7 @@ static int ide_disk_probe(struct device *dev)
|
||||
goto failed;
|
||||
|
||||
g = alloc_disk_node(1 << PARTN_BITS,
|
||||
pcibus_to_node(drive->hwif->pci_dev->bus));
|
||||
hwif_to_node(drive->hwif));
|
||||
if (!g)
|
||||
goto out_free_idkp;
|
||||
|
||||
|
Reference in New Issue
Block a user