From: Paul Fulghum <paulkf@microgate.com> Date: Thu, 19 Jan 2006 01:42:24 +0000 (-0800) Subject: [PATCH] synclink_gt fix size of register value storage X-Git-Tag: firefly_0821_release~38713 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=35fbd397f0ce2addd5ab889bf0bcd95f45837e3e;p=firefly-linux-kernel-4.4.55.git [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> --- diff --git a/drivers/char/synclink_gt.c b/drivers/char/synclink_gt.c index 07c9be6a6bbf..a85a60a93deb 100644 --- a/drivers/char/synclink_gt.c +++ b/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) { 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);