[PATCH] fbdev: use correct size in do_fscreeninfo_to_user()

From: Roel Kluin
Date: Wed Dec 16 2009 - 09:49:10 EST


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@xxxxxxxxx>
---
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);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/