]> git.baikalelectronics.ru Git - kernel.git/commit
Further fbcon sanity checking
authorBruno Prémont <bonbons@linux-vserver.org>
Sat, 14 May 2011 10:24:15 +0000 (12:24 +0200)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 14 May 2011 17:28:54 +0000 (10:28 -0700)
commitb1299d15375a928d2e87cef08796c16ae3778375
tree3f3f7ade41317d86305a3839d9f2ad646945aa60
parentda45484f12c92d2ae9303bd71c9d7aa67dd125ff
Further fbcon sanity checking

This moves the

    if (num_registered_fb == FB_MAX)
            return -ENXIO;

check _AFTER_ the call to do_remove_conflicting_framebuffers() as this
would (now in a safe way) allow a native driver to replace the
conflicting one even if all slots in registered_fb[] are taken.

This also prevents unregistering a framebuffer that is no longer
registered (vga16f will unregister at module unload time even if the
frame buffer had been unregistered earlier due to being found
conflicting).

Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/video/fbmem.c