Commit db1db294 authored by Samuel Iglesias Gonsalvez's avatar Samuel Iglesias Gonsalvez Committed by Greg Kroah-Hartman

Staging: ipack/devices/ipoctal: fix oops when accessing "buffer"

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: default avatarSamuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7756d3e8
...@@ -46,7 +46,6 @@ struct ipoctal { ...@@ -46,7 +46,6 @@ struct ipoctal {
struct scc2698_channel *chan_regs; struct scc2698_channel *chan_regs;
struct scc2698_block *block_regs; struct scc2698_block *block_regs;
struct ipoctal_stats chan_stats[NR_CHANNELS]; struct ipoctal_stats chan_stats[NR_CHANNELS];
char *buffer[NR_CHANNELS];
unsigned int nb_bytes[NR_CHANNELS]; unsigned int nb_bytes[NR_CHANNELS];
unsigned int count_wr[NR_CHANNELS]; unsigned int count_wr[NR_CHANNELS];
wait_queue_head_t queue[NR_CHANNELS]; wait_queue_head_t queue[NR_CHANNELS];
...@@ -305,7 +304,7 @@ static int ipoctal_irq_handler(void *arg) ...@@ -305,7 +304,7 @@ static int ipoctal_irq_handler(void *arg)
continue; continue;
} }
spin_lock(&ipoctal->lock[channel]); 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_write_io_reg(ipoctal,
&ipoctal->chan_regs[channel].u.w.thr, &ipoctal->chan_regs[channel].u.w.thr,
value); value);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment