diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index 39662f0c9cce65afd9da3b397607093f05a3f026..0a1b1ea36ddcdc3064ba4daa35567a01e0f5b72d 100644
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@ -50,9 +50,9 @@
 #define DBG_RX          0x0200
 #define DBG_TX          0x0400
 static unsigned int debugflags;
-static unsigned int nbds_max = 16;
 #endif /* NDEBUG */
 
+static unsigned int nbds_max = 16;
 static struct nbd_device nbd_dev[MAX_NBD];
 
 /*