diff --git a/cpu/native/periph/random.c b/cpu/native/periph/random.c
index 25e597a95da62839e1ca3dc79451e2a71b784796..9fe1dcae10969b8dea0ae8af06e588c214dda947 100644
--- a/cpu/native/periph/random.c
+++ b/cpu/native/periph/random.c
@@ -92,7 +92,6 @@ int random_read(char *buf, unsigned int num)
             num = _native_rng_read_det(buf, num);
             break;
         default:
-            num = 0;
             err(EXIT_FAILURE, "random_read: _native_rng_mode is in invalid state %i\n",
                    _native_rng_mode);
             break;