diff --git a/tests/unittests/tests-littlefs/tests-littlefs.c b/tests/unittests/tests-littlefs/tests-littlefs.c
index 1eec077477de359d84af3d872a3e6ce158132b3d..e98971b758e593c6acf68c61e6dfdb6b06fefa95 100644
--- a/tests/unittests/tests-littlefs/tests-littlefs.c
+++ b/tests/unittests/tests-littlefs/tests-littlefs.c
@@ -46,7 +46,6 @@ static int _init(mtd_dev_t *dev)
 {
     (void)dev;
 
-    memset(dummy_memory, 0xff, sizeof(dummy_memory));
     return 0;
 }
 
@@ -407,6 +406,10 @@ static void tests_littlefs_statvfs(void)
 
 Test *tests_littlefs_tests(void)
 {
+#ifndef MTD_0
+    memset(dummy_memory, 0xff, sizeof(dummy_memory));
+#endif
+
     EMB_UNIT_TESTFIXTURES(fixtures) {
         new_TestFixture(tests_littlefs_format),
         new_TestFixture(tests_littlefs_mount_umount),