lkml.org 
[lkml]   [2008]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] char/synclink_gt: fix uninitialized return value in put_char()

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;

\
 
 \ /
  Last update: 2008-05-10 21:15    [W:0.024 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site