summaryrefslogtreecommitdiff
path: root/drivers/video/uvesafb.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-04-04 21:28:36 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2014-04-04 21:28:36 -0700
commit8e0c0832348c7fda1c85d67697cfe4adf077344c (patch)
treecef1ffd1be7399d171edafc65f52661e81405068 /drivers/video/uvesafb.c
parent05b1332eafba8eb250da2d2c4c52ed436a127f90 (diff)
parent13ba0ad4490c3dd08b15c430a7a01c6fb45d5bce (diff)
Merge tag 'fbdev-main-3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux
Pull fbdev changes from Tomi Valkeinen: "Various fbdev fixes and improvements, but nothing big" * tag 'fbdev-main-3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: (38 commits) fbdev: Make the switch from generic to native driver less alarming Video: atmel: avoid the id of fix screen info is overwritten video: imxfb: Add DT default contrast control register property. video: atmel_lcdfb: ensure the hardware is initialized with the correct mode fbdev: vesafb: add dev->remove() callback fbdev: efifb: add dev->remove() callback video: pxa3xx-gcu: switch to devres functions video: pxa3xx-gcu: provide an empty .open call video: pxa3xx-gcu: pass around struct device * video: pxa3xx-gcu: rename some symbols sisfb: fix 1280x720 resolution support video: fbdev: uvesafb: Remove impossible code path in uvesafb_init_info video: fbdev: uvesafb: Remove redundant NULL check in uvesafb_remove fbdev: FB_OPENCORES should depend on HAS_DMA OMAPDSS: convert pixel clock to common videomode style OMAPDSS: Remove unused get_context_loss_count support OMAPDSS: use DISPC register to detect context loss video: da8xx-fb: Use "SIMPLE_DEV_PM_OPS" macro video: imxfb: Convert to SIMPLE_DEV_PM_OPS video: imxfb: Resolve mismatch between backlight/contrast ...
Diffstat (limited to 'drivers/video/uvesafb.c')
-rw-r--r--drivers/video/uvesafb.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/video/uvesafb.c b/drivers/video/uvesafb.c
index 1f38445014c1..509d452e8f91 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)
* 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
@@ -1812,11 +1807,9 @@ static int uvesafb_remove(struct platform_device *dev)
fb_destroy_modedb(info->monspecs.modedb);
fb_dealloc_cmap(&info->cmap);
- if (par) {
- kfree(par->vbe_modes);
- kfree(par->vbe_state_orig);
- kfree(par->vbe_state_saved);
- }
+ kfree(par->vbe_modes);
+ kfree(par->vbe_state_orig);
+ kfree(par->vbe_state_saved);
framebuffer_release(info);
}