Browse Source

[PATCH] synclink_gt fix size of register value storage

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>
Paul Fulghum 19 years ago
parent
commit
35fbd397f0
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/char/synclink_gt.c

+ 1 - 1
drivers/char/synclink_gt.c

@@ -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)
 static int set_interface(struct slgt_info *info, int if_mode)
 {
 {
  	unsigned long flags;
  	unsigned long flags;
-	unsigned char val;
+	unsigned short val;
 
 
 	DBGINFO(("%s set_interface=%x)\n", info->device_name, if_mode));
 	DBGINFO(("%s set_interface=%x)\n", info->device_name, if_mode));
 	spin_lock_irqsave(&info->lock,flags);
 	spin_lock_irqsave(&info->lock,flags);