diff options
Diffstat (limited to 'drivers/mtd/tests/mtd_stresstest.c')
-rw-r--r-- | drivers/mtd/tests/mtd_stresstest.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/mtd/tests/mtd_stresstest.c b/drivers/mtd/tests/mtd_stresstest.c index 3c9008adbe3b..52ffd9120e0d 100644 --- a/drivers/mtd/tests/mtd_stresstest.c +++ b/drivers/mtd/tests/mtd_stresstest.c | |||
@@ -30,7 +30,7 @@ | |||
30 | 30 | ||
31 | #define PRINT_PREF KERN_INFO "mtd_stresstest: " | 31 | #define PRINT_PREF KERN_INFO "mtd_stresstest: " |
32 | 32 | ||
33 | static int dev; | 33 | static int dev = -EINVAL; |
34 | module_param(dev, int, S_IRUGO); | 34 | module_param(dev, int, S_IRUGO); |
35 | MODULE_PARM_DESC(dev, "MTD device number to use"); | 35 | MODULE_PARM_DESC(dev, "MTD device number to use"); |
36 | 36 | ||
@@ -250,6 +250,13 @@ static int __init mtd_stresstest_init(void) | |||
250 | 250 | ||
251 | printk(KERN_INFO "\n"); | 251 | printk(KERN_INFO "\n"); |
252 | printk(KERN_INFO "=================================================\n"); | 252 | printk(KERN_INFO "=================================================\n"); |
253 | |||
254 | if (dev < 0) { | ||
255 | printk(PRINT_PREF "Please specify a valid mtd-device via module paramter\n"); | ||
256 | printk(KERN_CRIT "CAREFUL: This test wipes all data on the specified MTD device!\n"); | ||
257 | return -EINVAL; | ||
258 | } | ||
259 | |||
253 | printk(PRINT_PREF "MTD device: %d\n", dev); | 260 | printk(PRINT_PREF "MTD device: %d\n", dev); |
254 | 261 | ||
255 | mtd = get_mtd_device(NULL, dev); | 262 | mtd = get_mtd_device(NULL, dev); |