diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-09-23 15:00:15 (GMT) |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2013-09-26 08:45:15 (GMT) |
commit | a2a6fc5f182fdb179a4f5262ee77c2c2684fe0cd (patch) | |
tree | c5fed39c3114d7ca3e1f4bf1a2e27466fbb5be20 /drivers/video/s3fb.c | |
parent | fb8a15079a579f4cd0e01c9d37e868f5c2b4994c (diff) | |
download | linux-fsl-qoriq-a2a6fc5f182fdb179a4f5262ee77c2c2684fe0cd.tar.xz |
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.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/video/s3fb.c b/drivers/video/s3fb.c index 47ca86c..d838ba8 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; } |