diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c index 098bfc64cfb9..9217be3d8f3e 100644 --- a/drivers/video/fbmem.c +++ b/drivers/video/fbmem.c @@ -1305,7 +1305,9 @@ static int do_fscreeninfo_to_user(struct fb_fix_screeninfo *fix, err |= copy_to_user(fix32->reserved, fix->reserved, sizeof(fix->reserved)); - return err; + if (err) + return -EFAULT; + return 0; } static int fb_get_fscreeninfo(struct fb_info *info, unsigned int cmd,