par->asleep = 0;
        par->lock_blank = 0;
 
+       if (register_framebuffer(info) < 0)
+               return 0;
+
 #ifdef CONFIG_FB_ATY128_BACKLIGHT
        if (backlight)
                aty128_bl_init(par);
 #endif
 
-       if (register_framebuffer(info) < 0)
-               return 0;
-
        fb_info(info, "%s frame buffer device on %s\n",
                info->fix.id, video_card);
 
 
        par = info->par;
 
-       unregister_framebuffer(info);
-
 #ifdef CONFIG_FB_ATY128_BACKLIGHT
        aty128_bl_exit(info->bl_dev);
 #endif
 
+       unregister_framebuffer(info);
+
        arch_phys_wc_del(par->wc_cookie);
        iounmap(par->regbase);
        iounmap(info->screen_base);