linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fbdev: use correct size in do_fscreeninfo_to_user()
@ 2009-12-16 14:50 Roel Kluin
  0 siblings, 0 replies; only message in thread
From: Roel Kluin @ 2009-12-16 14:50 UTC (permalink / raw)
  To: Andrew Morton, LKML, adaplas, linux-fbdev

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

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index 99bbd28..57959c8 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -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);

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-12-16 14:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-16 14:50 [PATCH] fbdev: use correct size in do_fscreeninfo_to_user() Roel Kluin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).