tree fabd0b532d2ae4eb31cab9fc59989d0888c6e346
parent 0fa2f491f0547ddb87fa3069afee3eda43b51057
author Brice Goglin <[EMAIL PROTECTED]> Wed, 07 Sep 2005 05:19:25 -0700
committer Linus Torvalds <[EMAIL PROTECTED]> Thu, 08 Sep 2005 06:57:59 -0700

[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 <[EMAIL PROTECTED]>
Cc: Dmitry Torokhov <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>

 drivers/net/irda/smsc-ircc2.c |    1 +
 1 files changed, 1 insertion(+)

diff --git a/drivers/net/irda/smsc-ircc2.c b/drivers/net/irda/smsc-ircc2.c
--- 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)
                if (smsc_ircc_open(ircc_fir, ircc_sir, ircc_dma, ircc_irq))
                        ret = -ENODEV;
        } else {
+               ret = -ENODEV;
 
                /* try user provided configuration register base address */
                if (ircc_cfg > 0) {
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to