Skip to content

Commit

Permalink
cciss: fix regression that no device nodes are created if no logical …
Browse files Browse the repository at this point in the history
…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: Stephen M. Cameron <scameron@beardog.cca.cpqcorp.net>
Acked-by: Mike Miller <mike.miller@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Stephen M. Cameron authored and Linus Torvalds committed Jul 4, 2008
1 parent f93f18c commit 77b96bd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/block/cciss.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 77b96bd

Please sign in to comment.