diff --git a/drivers/video/fbdev/udlfb.c b/drivers/video/fbdev/udlfb.c index e78d6f95c9c5..92b352bc7e96 100644 --- a/drivers/video/fbdev/udlfb.c +++ b/drivers/video/fbdev/udlfb.c @@ -1293,6 +1293,11 @@ static int dlfb_setup_modes(struct dlfb_data *dlfb, goto error; } + if (dlfb->fb_count) { + result = -EINVAL; + goto error; + } + fb_destroy_modelist(&info->modelist); memset(&info->monspecs, 0, sizeof(info->monspecs));