[PATCH] synclink_gt fix size of register value storage
authorPaul Fulghum <paulkf@microgate.com>
Thu, 19 Jan 2006 01:42:24 +0000 (17:42 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Thu, 19 Jan 2006 03:20:16 +0000 (19:20 -0800)
Fix incorrect variable size used to hold register value.  This bug might
wipe out a portion of the TCR value when setting the interface options.

Signed-off-by: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/char/synclink_gt.c

index 07c9be6a6bbf4ceebbb9103e9f3b6b2fc1f99657..a85a60a93deb27358e7a7d7d9e6806c3bedacafe 100644 (file)
@@ -2630,7 +2630,7 @@ static int get_interface(struct slgt_info *info, int __user *if_mode)
 static int set_interface(struct slgt_info *info, int if_mode)
 {
        unsigned long flags;
-       unsigned char val;
+       unsigned short val;
 
        DBGINFO(("%s set_interface=%x)\n", info->device_name, if_mode));
        spin_lock_irqsave(&info->lock,flags);