summaryrefslogtreecommitdiffstats
path: root/drivers/video/s3fb.c
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2013-09-23 23:00:15 +0800
committerTomi Valkeinen <tomi.valkeinen@ti.com>2013-09-26 11:45:15 +0300
commita2a6fc5f182fdb179a4f5262ee77c2c2684fe0cd (patch)
treec5fed39c3114d7ca3e1f4bf1a2e27466fbb5be20 /drivers/video/s3fb.c
parentfb8a15079a579f4cd0e01c9d37e868f5c2b4994c (diff)
downloadblackbird-op-linux-a2a6fc5f182fdb179a4f5262ee77c2c2684fe0cd.tar.gz
blackbird-op-linux-a2a6fc5f182fdb179a4f5262ee77c2c2684fe0cd.zip
s3fb: fix error return code in s3_pci_probe()
Fix to return -EINVAL when virtual vertical size smaller than real instead of 0, as done elsewhere in this function. Also remove dup code. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/s3fb.c')
-rw-r--r--drivers/video/s3fb.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/video/s3fb.c b/drivers/video/s3fb.c
index 47ca86c5c6c0..d838ba829459 100644
--- a/drivers/video/s3fb.c
+++ b/drivers/video/s3fb.c
@@ -1336,14 +1336,7 @@ static int s3_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
(info->var.bits_per_pixel * info->var.xres_virtual);
if (info->var.yres_virtual < info->var.yres) {
dev_err(info->device, "virtual vertical size smaller than real\n");
- goto err_find_mode;
- }
-
- /* maximize virtual vertical size for fast scrolling */
- info->var.yres_virtual = info->fix.smem_len * 8 /
- (info->var.bits_per_pixel * info->var.xres_virtual);
- if (info->var.yres_virtual < info->var.yres) {
- dev_err(info->device, "virtual vertical size smaller than real\n");
+ rc = -EINVAL;
goto err_find_mode;
}
OpenPOWER on IntegriCloud