summaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2023-04-28 14:24:49 +0200
committerThomas Zimmermann <tzimmermann@suse.de>2023-05-08 15:28:34 +0200
commit453bd91302f16ddb8a2f5eb3df9fda3206dbacef (patch)
treea126d0ad020c09ca5160b0f50479ebd5aa98fb4c /drivers/media
parentf06875dc4c4f5d8895519857e441d407e88280e4 (diff)
downloadlinux-stable-453bd91302f16ddb8a2f5eb3df9fda3206dbacef.tar.gz
linux-stable-453bd91302f16ddb8a2f5eb3df9fda3206dbacef.tar.bz2
linux-stable-453bd91302f16ddb8a2f5eb3df9fda3206dbacef.zip
fbdev: Don't re-validate info->state in fb_ops implementations
The file-op entry points fb_read() and fb_write() verify that info->state has been set to FBINFO_STATE_RUNNING. Remove the same test from the implementations of struct fb_ops.{fb_read,fb_write}. v2: * also remove test from ivtvfb, braodsheetfb, hecubafb and metronomefb (Geert) Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Tested-by: Sui Jingfeng <suijingfeng@loongson.cn> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Helge Deller <deller@gmx.de> Link: https://patchwork.freedesktop.org/patch/msgid/20230428122452.4856-17-tzimmermann@suse.de
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/pci/ivtv/ivtvfb.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/media/pci/ivtv/ivtvfb.c b/drivers/media/pci/ivtv/ivtvfb.c
index 00ac94d4ab19..22123a25daea 100644
--- a/drivers/media/pci/ivtv/ivtvfb.c
+++ b/drivers/media/pci/ivtv/ivtvfb.c
@@ -378,9 +378,6 @@ static ssize_t ivtvfb_write(struct fb_info *info, const char __user *buf,
unsigned long dma_size;
u16 lead = 0, tail = 0;
- if (info->state != FBINFO_STATE_RUNNING)
- return -EPERM;
-
total_size = info->screen_size;
if (total_size == 0)