diff options
author | Brice Goglin <Brice.Goglin@ens-lyon.org> | 2005-09-06 18:19:25 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-07 19:57:59 -0400 |
commit | 505db03639db34ca2c64fe7ee27190d324281f2c (patch) | |
tree | fabd0b532d2ae4eb31cab9fc59989d0888c6e346 /drivers/net/irda | |
parent | 0fa2f491f0547ddb87fa3069afee3eda43b51057 (diff) |
[PATCH] Fix smsc_ircc_init return value
I noticed a strange return value in smsc_ircc_init in
drivers/net/irda/smsc_ircc2.c in rc4-mm1.
When reaching the line "if (ircc_fir > 0 && ircc_sir > 0)", ret is 0. So I
don't see the point of setting it to 0 in the "else" case. >From what I
see in 2.6.12 it should probably be set to -ENODEV at the begining of the
"else" case. The attached patch does this.
Note that I didn't actually see any breakage caused by this.
Signed-off-by: Brice Goglin <Brice.Goglin@ens-lyon.org>
Cc: Dmitry Torokhov <dtor_core@ameritech.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/net/irda')
-rw-r--r-- | drivers/net/irda/smsc-ircc2.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/irda/smsc-ircc2.c b/drivers/net/irda/smsc-ircc2.c index 2c9d3309314c..dd89bda1f131 100644 --- a/drivers/net/irda/smsc-ircc2.c +++ b/drivers/net/irda/smsc-ircc2.c | |||
@@ -360,6 +360,7 @@ static int __init smsc_ircc_init(void) | |||
360 | if (smsc_ircc_open(ircc_fir, ircc_sir, ircc_dma, ircc_irq)) | 360 | if (smsc_ircc_open(ircc_fir, ircc_sir, ircc_dma, ircc_irq)) |
361 | ret = -ENODEV; | 361 | ret = -ENODEV; |
362 | } else { | 362 | } else { |
363 | ret = -ENODEV; | ||
363 | 364 | ||
364 | /* try user provided configuration register base address */ | 365 | /* try user provided configuration register base address */ |
365 | if (ircc_cfg > 0) { | 366 | if (ircc_cfg > 0) { |