login
Header Space

 
 

[PATCH] char/synclink_gt: fix uninitialized return value in put_char()

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <paulkf@...>
Cc: <linux-kernel@...>
Date: Saturday, May 10, 2008 - 3:13 pm

put_char() can return an uninitialized value of 'ret' in one code path.

Signed-off-by: Chris Peterson <cpeterso@cpeterso.com>
---
--- linux-2.6.25-rc1-git7-before/drivers/char/synclink_gt.c	2008-05-10 11:43:19.000000000 -0700
+++ linux-2.6.25-rc1-git7-after/drivers/char/synclink_gt.c	2008-05-10 11:51:22.000000000 -0700
@@ -927,6 +927,8 @@ static int put_char(struct tty_struct *t
 	if (!info->tx_active && (info->tx_count < info->max_frame_size)) {
 		info->tx_buf[info->tx_count++] = ch;
 		ret = 1;
+	} else {
+		ret = 0;
 	}
 	spin_unlock_irqrestore(&info->lock,flags);
 	return ret;
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] char/synclink_gt: fix uninitialized return value in ..., Chris Peterson, (Sat May 10, 3:13 pm)
speck-geostationary