lkml.org 
[lkml]   [2001]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] missing return value from pci_xircom_fn() in drivers/char/serial.c

Hi,

I'm using the 2.4.4-ac8 kernel and found that the pci_xircom_fn()
function in drivers/char/serial.c does not return a value even though it
is defined as returning int. I took a look at the other initializer
functions and they all return 0 (zero) on success, so I assumed that the
correct return value for the pci_xircom_fn() function would also be 0. I
don't know anything specific about what goes on in serial.c, so I may be
wrong on this, but I do know that the function should either return some
value or be declared as returning void, and since declaring it void
would mess up the way it is used I guess it should return a value.

I have made a patch against 2.4.4-ac8 that makes the change, it is
below. I guess someone more knowledgeable than me can probably see if
this is correct. If this is completely bogus, then please just disregard
this email.


--- linux-2.4.4-ac8/drivers/char/serial.c.orig Sun May 13 23:13:02 2001
+++ linux-2.4.4-ac8/drivers/char/serial.c Sun May 13 23:13:24 2001
@@ -4190,6 +4190,7 @@
{
__set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(HZ/10);
+ return(0);
}

/*

Best regards,
Jesper Juhl - juhl@eisenstein.dk

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:52    [W:0.028 / U:13.840 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site