diff options
author | Wang YanQing <udknight@gmail.com> | 2014-03-05 10:56:19 -0500 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2014-03-06 04:29:40 -0500 |
commit | 92559977ddf13748fc4a07ac0a2dfa1ff5132cac (patch) | |
tree | 5b07393239f26f31b831a85a19f0125746f435f8 /drivers/video/uvesafb.c | |
parent | a57aa93f44f34ce6e3b3ed0b114d5eea46234aef (diff) |
video: fbdev: uvesafb: Remove impossible code path in uvesafb_init_info
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>
Diffstat (limited to 'drivers/video/uvesafb.c')
-rw-r--r-- | drivers/video/uvesafb.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/video/uvesafb.c b/drivers/video/uvesafb.c index 70a02a2d60bf..17e262ecd4d0 100644 --- a/drivers/video/uvesafb.c +++ b/drivers/video/uvesafb.c | |||
@@ -1474,12 +1474,7 @@ static void uvesafb_init_info(struct fb_info *info, struct vbe_mode_ib *mode) | |||
1474 | * used video mode, i.e. the minimum amount of | 1474 | * used video mode, i.e. the minimum amount of |
1475 | * memory we need. | 1475 | * memory we need. |
1476 | */ | 1476 | */ |
1477 | if (mode != NULL) { | 1477 | size_vmode = info->var.yres * mode->bytes_per_scan_line; |
1478 | size_vmode = info->var.yres * mode->bytes_per_scan_line; | ||
1479 | } else { | ||
1480 | size_vmode = info->var.yres * info->var.xres * | ||
1481 | ((info->var.bits_per_pixel + 7) >> 3); | ||
1482 | } | ||
1483 | 1478 | ||
1484 | /* | 1479 | /* |
1485 | * size_total -- all video memory we have. Used for mtrr | 1480 | * size_total -- all video memory we have. Used for mtrr |