video: fbdev: uvesafb: Remove impossible code path in uvesafb_init_info
authorWang YanQing <udknight@gmail.com>
Wed, 5 Mar 2014 15:56:19 +0000 (23:56 +0800)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Thu, 6 Mar 2014 09:29:40 +0000 (11:29 +0200)
Because uvesafb_vbe_init will fail when get zero avaiable modes,
and we have checked the return value of uvesafb_vbe_init_mode,
so it is impossible to pass NULL as mode into uvesafb_init_info.

[ This patch fix warning report by fengguang.wu@intel.com
  "drivers/video/fbdev/uvesafb.c:1509 uvesafb_init_info()
   error: we previously assumed 'mode' could be null" ]

Signed-off-by: Wang YanQing <udknight@gmail.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/video/uvesafb.c

index 70a02a2d60bf4740f4a71aa8e2fd2fc519460b09..17e262ecd4d06427653d8b0db550b95be34503e5 100644 (file)
@@ -1474,12 +1474,7 @@ static void uvesafb_init_info(struct fb_info *info, struct vbe_mode_ib *mode)
         *                 used video mode, i.e. the minimum amount of
         *                 memory we need.
         */
-       if (mode != NULL) {
-               size_vmode = info->var.yres * mode->bytes_per_scan_line;
-       } else {
-               size_vmode = info->var.yres * info->var.xres *
-                            ((info->var.bits_per_pixel + 7) >> 3);
-       }
+       size_vmode = info->var.yres * mode->bytes_per_scan_line;
 
        /*
         *   size_total -- all video memory we have. Used for mtrr
This page took 0.025539 seconds and 5 git commands to generate.