Messages in this thread Patch in this message | | | Date | Sat, 10 May 2008 12:13:03 -0700 (PDT) | From | Chris Peterson <> | 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;
| |