Skip to content

Commit

Permalink
Staging: ipack/devices/ipoctal: fix oops when accessing "buffer"
Browse files Browse the repository at this point in the history
The buffer[][] field was replaced by tty_port->xmit_buf field but there was
some places that "buffer" was still accessed, giving a kernel oops because
it was uninitialized.

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Samuel Iglesias Gonsalvez authored and Greg Kroah-Hartman committed Jun 25, 2012
1 parent 7756d3e commit db1db29
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/staging/ipack/devices/ipoctal.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ struct ipoctal {
struct scc2698_channel *chan_regs;
struct scc2698_block *block_regs;
struct ipoctal_stats chan_stats[NR_CHANNELS];
char *buffer[NR_CHANNELS];
unsigned int nb_bytes[NR_CHANNELS];
unsigned int count_wr[NR_CHANNELS];
wait_queue_head_t queue[NR_CHANNELS];
Expand Down Expand Up @@ -305,7 +304,7 @@ static int ipoctal_irq_handler(void *arg)
continue;
}
spin_lock(&ipoctal->lock[channel]);
value = ipoctal->buffer[channel][*pointer_write];
value = ipoctal->tty_port[channel].xmit_buf[*pointer_write];
ipoctal_write_io_reg(ipoctal,
&ipoctal->chan_regs[channel].u.w.thr,
value);
Expand Down

0 comments on commit db1db29

Please sign in to comment.