]> git.baikalelectronics.ru Git - kernel.git/commit
serial: Char: cyclades, fix compiler warning
authorJiri Slaby <jslaby@novell.com>
Wed, 9 Dec 2009 20:34:13 +0000 (12:34 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 2 Mar 2010 22:43:11 +0000 (14:43 -0800)
commite0ce6a4d1a5cafbf95cb81005306f5974cdc1850
treee26b86b5a0dc9c7c8f5b0b3470e8e8301e577c3c
parente2e5ae583d53b95cf99afa3ddd17123b516f1e42
serial: Char: cyclades, fix compiler warning

With gcc 4.0.2:
drivers/char/cyclades.c: In function 'cyy_interrupt':
drivers/char/cyclades.c:581: warning: 'info' may be used uninitialized in this function

introduced by

: commit 1cf62d3ef77dc7f33f2e3e3474e75fbb6899024a
: 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

In fact the true branch which uses uninitialized 'info' can never
happen because chip is always less than ->nchips and channel is
always less than 4 which we alloc.

So behave similar to rx handling and remove the test completely.

I wonder why gcc 4.4.1 doesn't spit a word.

Reported-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Alan Cox <alan@linux.intel.com>
Signed-off-by: Jiri Slaby <jslaby@novell.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/char/cyclades.c