aboutsummaryrefslogtreecommitdiffstats
path: root/sbdd.c
diff options
context:
space:
mode:
Diffstat (limited to 'sbdd.c')
-rw-r--r--sbdd.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sbdd.c b/sbdd.c
index 39eab65..86ec402 100644
--- a/sbdd.c
+++ b/sbdd.c
@@ -178,6 +178,11 @@ static int sbdd_create(void)
unsigned int max_sectors;
sector_t totalsize = 0;
+ if (__sbdd_diskcount < 2) {
+ pr_err("not enough disks to make a RAID0\n");
+ return -EFAULT;
+ }
+
ret = bioset_init(&__sbdd_bio_set, BIO_POOL_SIZE, 0, 0);
if (ret) {
pr_err("create BIO set failed: %d\n", ret);