Commit 1a2b2821 authored by Andrew Morton's avatar Andrew Morton Committed by james toy

drivers/char/cyclades.c: In function 'cyy_interrupt':

drivers/char/cyclades.c:581: warning: 'info' may be used uninitialized in this function

a bug introduced by

: commit 3aeea5b9
: Author:     Jiri Slaby <jirislaby@gmail.com>
: AuthorDate: Sat Sep 19 13:13:16 2009 -0700
: Commit:     Live-CD User <linux@linux.site>
: CommitDate: Sat Sep 19 13:13:16 2009 -0700
:
:    cyclades: introduce cyy_readb/writeb

The fix is not really optimal but I think it'll work.

Cc: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent adb05860
...@@ -597,6 +597,7 @@ static void cyy_chip_tx(struct cyclades_card *cinfo, unsigned int chip, ...@@ -597,6 +597,7 @@ static void cyy_chip_tx(struct cyclades_card *cinfo, unsigned int chip,
channel = save_xir & CyIRChannel; channel = save_xir & CyIRChannel;
save_car = readb(base_addr + (CyCAR << index)); save_car = readb(base_addr + (CyCAR << index));
cy_writeb(base_addr + (CyCAR << index), save_xir); cy_writeb(base_addr + (CyCAR << index), save_xir);
info = &cinfo->ports[channel + chip * 4];
/* validate the port# (as configured and open) */ /* validate the port# (as configured and open) */
if (channel + chip * 4 >= cinfo->nports) { if (channel + chip * 4 >= cinfo->nports) {
...@@ -604,7 +605,6 @@ static void cyy_chip_tx(struct cyclades_card *cinfo, unsigned int chip, ...@@ -604,7 +605,6 @@ static void cyy_chip_tx(struct cyclades_card *cinfo, unsigned int chip,
readb(base_addr + (CySRER << index)) & ~CyTxRdy); readb(base_addr + (CySRER << index)) & ~CyTxRdy);
goto end; goto end;
} }
info = &cinfo->ports[channel + chip * 4];
tty = tty_port_tty_get(&info->port); tty = tty_port_tty_get(&info->port);
if (tty == NULL) { if (tty == NULL) {
cyy_writeb(info, CySRER, cyy_readb(info, CySRER) & ~CyTxRdy); cyy_writeb(info, CySRER, cyy_readb(info, CySRER) & ~CyTxRdy);
......
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