rk fb: fix first ddr freq NULL point
authorhjc <hjc@rock-chips.com>
Tue, 15 Apr 2014 11:08:07 +0000 (19:08 +0800)
committerhjc <hjc@rock-chips.com>
Tue, 15 Apr 2014 11:08:07 +0000 (19:08 +0800)
drivers/video/rockchip/rk_fb.c

index 2299e2c2bc7e670698ee122b561648633b4bdbe1..e718ab4a4d7a2eda75168387edd5f5e2d7e6c503 100755 (executable)
@@ -596,8 +596,10 @@ bool rk_fb_poll_wait_frame_complete(void)
 
        
        if (rk_fb_poll_prmry_screen_vblank() == RK_LF_STATUS_NC){
-               if(dev_drv->ops->set_irq_to_cpu)
-                        dev_drv->ops->set_irq_to_cpu(dev_drv,1);               
+               if (likely(dev_drv)) {
+                       if(dev_drv->ops->set_irq_to_cpu)
+                               dev_drv->ops->set_irq_to_cpu(dev_drv,1);
+               }
                return false;
        }