Commit 77b96bd7 authored by Stephen M. Cameron's avatar Stephen M. Cameron Committed by Linus Torvalds

cciss: fix regression that no device nodes are created if no logical drives are configured.

Fix regression in cciss driver that if no logical drives are configured,
no device nodes at all get created.
Signed-off-by: default avatarStephen M. Cameron <scameron@beardog.cca.cpqcorp.net>
Acked-by: default avatarMike Miller <mike.miller@hp.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent f93f18cd
......@@ -3546,6 +3546,10 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
for (j = 0; j <= hba[i]->highest_lun; j++)
add_disk(hba[i]->gendisk[j]);
/* we must register the controller even if no disks exist */
if (hba[i]->highest_lun == -1)
add_disk(hba[i]->gendisk[0]);
return 1;
clean4:
......
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