diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index a52cc7fe45e..c18bbbf04e4 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c @@ -323,6 +323,9 @@ static int cciss_seq_show(struct seq_file *seq, void *v) if (*pos > h->highest_lun) return 0; + if (drv == NULL) /* it's possible for h->drv[] to have holes. */ + return 0; + if (drv->heads == 0) return 0;