summaryrefslogtreecommitdiffstats
path: root/drivers/video/fbdev/i740fb.c
diff options
context:
space:
mode:
authorSebastian Reichel <sebastian.reichel@collabora.com>2022-05-22 23:03:29 +0200
committerSebastian Reichel <sebastian.reichel@collabora.com>2022-05-22 23:03:29 +0200
commitda50aad6d86716aa48a2b8463c85caea77c0355f (patch)
treec9604cc380e99e613c25ec06cbfcd5009c4575ba /drivers/video/fbdev/i740fb.c
parentpower: supply: bq24190_charger: using pm_runtime_resume_and_get instead of pm... (diff)
parentpower: supply: ab8500_fg: Allocate wq in probe (diff)
downloadlinux-da50aad6d86716aa48a2b8463c85caea77c0355f.tar.xz
linux-da50aad6d86716aa48a2b8463c85caea77c0355f.zip
Merge power-supply 'fixes' branch
Merge power-supply fixes, that missed the v5.18 merge window into power-supply's for-next branch. Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'drivers/video/fbdev/i740fb.c')
-rw-r--r--drivers/video/fbdev/i740fb.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/video/fbdev/i740fb.c b/drivers/video/fbdev/i740fb.c
index 52cce0db8bd3..09dd85553d4f 100644
--- a/drivers/video/fbdev/i740fb.c
+++ b/drivers/video/fbdev/i740fb.c
@@ -657,6 +657,9 @@ static int i740fb_decode_var(const struct fb_var_screeninfo *var,
static int i740fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
{
+ if (!var->pixclock)
+ return -EINVAL;
+
switch (var->bits_per_pixel) {
case 8:
var->red.offset = var->green.offset = var->blue.offset = 0;
@@ -740,7 +743,7 @@ static int i740fb_set_par(struct fb_info *info)
if (i)
return i;
- memset(info->screen_base, 0, info->screen_size);
+ memset_io(info->screen_base, 0, info->screen_size);
vga_protect(par);