fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / drivers / video / retz3fb.c
index 5b6d5aa..bc7ffc8 100644 (file)
@@ -25,7 +25,6 @@
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/mm.h>
-#include <linux/tty.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
 #include <linux/fb.h>
@@ -1424,16 +1423,16 @@ int __init retz3fb_init(void)
 
                do_install_cmap(0, fb_info);
 
-               if (register_framebuffer(fb_info) < 0)
+               if (register_framebuffer(fb_info) < 0) {
+                       iounmap(zinfo->base);
                        return -EINVAL;
+               }
 
                printk(KERN_INFO "fb%d: %s frame buffer device, using %ldK of "
                       "video memory\n", fb_info->node,
                       fb_info->modename, zinfo->fbsize>>10);
 
                /* FIXME: This driver cannot be unloaded yet */
-               MOD_INC_USE_COUNT;
-
                res = 0;
        }
        return res;
@@ -1491,16 +1490,6 @@ int init_module(void)
 {
        return retz3fb_init();
 }
-
-void cleanup_module(void)
-{
-       /*
-        * Not reached because the usecount will never
-        * be decremented to zero
-        *
-        * FIXME: clean up ... *
-        */
-}
 #endif