summaryrefslogtreecommitdiffstats
path: root/drivers/char/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/misc.c')
-rw-r--r--drivers/char/misc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/char/misc.c b/drivers/char/misc.c
index 3a19fa3269ff..1312e29deb00 100644
--- a/drivers/char/misc.c
+++ b/drivers/char/misc.c
@@ -194,6 +194,7 @@ int misc_register(struct miscdevice *misc)
if (is_dynamic) {
int i = find_first_zero_bit(misc_minors, DYNAMIC_MINORS);
+
if (i >= DYNAMIC_MINORS) {
err = -EBUSY;
goto out;