framebuffer: Remove pointless test
authorRémi Denis-Courmont <rdenis@simphalempin.com>
Wed, 11 Feb 2009 15:51:25 +0000 (17:51 +0200)
committerRémi Denis-Courmont <rdenis@simphalempin.com>
Wed, 11 Feb 2009 15:51:25 +0000 (17:51 +0200)
The error value for mmap() is MAP_FAILED, which is not nul. But we
check for that case in Open() anyway.

modules/video_output/fb.c

index 602a888..eac3c2a 100644 (file)
@@ -944,12 +944,9 @@ static int OpenDisplay( vout_thread_t *p_vout )
  *****************************************************************************/
 static void CloseDisplay( vout_thread_t *p_vout )
 {
-    if( p_vout->p_sys->p_video )
-    {
-        /* Clear display */
-        memset( p_vout->p_sys->p_video, 0, p_vout->p_sys->i_page_size );
-        munmap( p_vout->p_sys->p_video, p_vout->p_sys->i_page_size );
-    }
+    /* Clear display */
+    memset( p_vout->p_sys->p_video, 0, p_vout->p_sys->i_page_size );
+    munmap( p_vout->p_sys->p_video, p_vout->p_sys->i_page_size );
 
     if( p_vout->p_sys->i_fd >= 0 )
     {