Skip to content

Commit 505db03

Browse files
Brice GoglinLinus Torvalds
authored andcommitted
[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>
1 parent 0fa2f49 commit 505db03

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎drivers/net/irda/smsc-ircc2.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,7 @@ static int __init smsc_ircc_init(void)
360360
if (smsc_ircc_open(ircc_fir, ircc_sir, ircc_dma, ircc_irq))
361361
ret = -ENODEV;
362362
} else {
363+
ret = -ENODEV;
363364

364365
/* try user provided configuration register base address */
365366
if (ircc_cfg > 0) {

0 commit comments

Comments
 (0)