]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/block/cciss.c
cciss: Make cciss_seq_show handle holes in the h->drv[] array
[karo-tx-linux.git] / drivers / block / cciss.c
index 92b126394fa1f1f9605bd5227242fbd9d01c691b..ca9c54870f29b296ae031e15db3bdd32d44f660a 100644 (file)
@@ -339,6 +339,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;