Skip to contentSkip to conversation

fbdev: use correct size in do_fscreeninfo_to_user()

PATCH New Roel Kluin 1 participant 1 message Dec 16, 2009 Framebuffer layer

lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/1 fbdev: use correct size in do_fscreeninfo_to_user()

Although these sizes may be the same it is better to calculate the size of the source, than of the destiny.

---

drivers/video/fbmem.c +1 -1
index 99bbd28..57959c8 100644
@@ -1234,7 +1234,7 @@ static int do_fscreeninfo_to_user(struct fb_fix_screeninfo *fix,
 	__u32 data;
 	int err;
 
-	err = copy_to_user(&fix32->id, &fix->id, sizeof(fix32->id));
+	err = copy_to_user(&fix32->id, &fix->id, sizeof(fix->id));
 
 	data = (__u32) (unsigned long) fix->smem_start;
 	err |= put_user(data, &fix32->smem_start);